Solved

How to use JSP

Posted on 2004-09-19
8
228 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
8 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 85 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 83 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 83 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 11

Assisted Solution

by:sompol_kiatkamolchai
sompol_kiatkamolchai earned 83 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 83 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 83 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
getting Http 404 error in jsp forms 8 81
spring AOP 6 88
bean mapper frameworks 5 63
jdbc error in jsp application 20 64
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 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