Solved

How to use JSP

Posted on 2004-09-19
8
237 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 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
Technology Partners: 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 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exception creating bean of class 5 235
how to exclude a file using regex 5 123
throw exception 21 76
jsp error 6 67
The goal of this blog is: - To define the incident management process - To go over the key elements of an incident management system - To look into incident alert management tools that integrate with ConnectWise.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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