?
Solved

How to use JSP

Posted on 2004-09-19
8
Medium Priority
?
252 Views
Last Modified: 2010-04-01


Hi,

I have never used JSP. i need help urgently.

where  and how do i create my JSP page

how do i execute/run my JSP page.

do i need special software

0
Comment
Question by:nadine-gibson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 340 total points
ID: 12098082
Hi nadine-gibson,

You would need a server. Most people use Tomcat (http://jakarta.apache.org/tomcat/index.html)

Then, you would need to learn JSP and configure your server correctly. There are instructions how to do that, but if it gets messy, you could always post here.

Regards,
Zyloch
0
 
LVL 7

Assisted Solution

by:lhankins
lhankins earned 332 total points
ID: 12098204
Here are some freely downloadable books on learning JSP programming:

    http://www.freeprogrammingresources.com/jspbook.html

0
 
LVL 21

Assisted Solution

by:MogalManic
MogalManic earned 332 total points
ID: 12098293
To get a feel on how JSP works, the Tomcat installation comes with some examples you should check out.  The simple definition would be that is is simalar you PHP and/or JSP in that it is normal HTML on the client side with Java scriptlets which run on the server side.  This is a simple page that prompts for you name and then says hi.

<html>
  <head>
     <title>jsp Demo</title>
   </head>

<body>
<form action='' method='post'>
  <%if (request.getMethod().equalsIgnoreCase("POST")) {%>
         <h1>Hello, <%=request.getParameter("name")%></h1>
  <%} else {%>
        <input type='text' name='name'/> <br/>
        <input type='submit' name='submit' value='submit'/>
   <%}%>
</form>
</body>
</html>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Assisted Solution

by:sompol_kiatkamolchai
sompol_kiatkamolchai earned 332 total points
ID: 12098577
You must have servlet container such as Tomcat like Zyloch provide link above.
Then  install it, and try to start server and run its example.
If everything ok, try to create you first JSP by

HelloWorld.jsp
=========
<%
String name = request.getParameter("name");
%>
Hello World, <%=name%>.

and put it to C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT

then access them by opening browser and type this in address bar

http://localhost:8080/HelloWorld.jsp?name=My Name


Free e-book
========
http://www.theserverside.com/books/addisonwesley/ServletsJSP/index.tss

Good link
======
http://www.jsptut.com/
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html
http://java.sun.com/products/jsp/docs.html
http://java.sun.com/j2ee/learning/tutorial/
http://www.visualbuilder.com/jsp/tutorial/
0
 
LVL 9

Assisted Solution

by:ronan_40060
ronan_40060 earned 332 total points
ID: 12100020

Check out the discussion of compiling jsp under tomcat at
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21133304.html
0
 
LVL 4

Assisted Solution

by:MacroLand
MacroLand earned 332 total points
ID: 12166271
To use JSP you need to know java and HTML. You can use JSP like ASP or PHP. But JSP is purely a mixture of java and HTML.
You can build dynamic pages with JSP and support them with servlets which are pure Java code. Actually JSP is turned into servlets before execution but you dont see them unless you want to trace an error within the code.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question