File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes compiling jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "compiling jsp" Watch "compiling jsp" New topic

compiling jsp

Vasantha Ajjampudi

Joined: Jul 08, 2002
Posts: 5
I have just started working on jsp pages. how do I compile my jsp page and view it.Using tomcat server. I know tomcat has jasper compiler to compile jsps. do I have to set any class path for this to use the compiler?
so please tell me how to compile and run a jsp page.

Thanks in advance.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

As this is a Tomcat setup issue, moving to the Tomcat forum.
[ September 08, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 672
You only need to put jsp in Tomcat app (example webapp for example) and run it from browser, Tomcat will compile it.

We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Vasantha Ajjampudi

Joined: Jul 08, 2002
Posts: 5
Thanks bruce for ur reply.
But its not working that way.. I have a html page that calls this jsp page.. I can see the values (entered in html) in the url after submitting the page but these values r not being displayed in jsp page..
using request.getParamter()to retrieve values from previous page and displaying.

any ideas?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

what do you see in the address bar? (copy and paste it into your message, the entire thing)

what is your JSP code ?
Vasantha Ajjampudi

Joined: Jul 08, 2002
Posts: 5

In my html file Iam entering firstname lastname and mail id . so after I click submit button my address bar show this


jsp code:

<Title>Displaying Details</Title>
String firstName = request.getParameter("fname");
String lastName = request.getParameter("lName");
String mailId = request.getParameter("email");

<h1>Thanks for joining our mailing list</h1>
<p>Here are the details you have entered</p>

<table cellspacing = "5" cellpadding="5">
<td align ="right">First Name</td>
<td align ="right">Last Name</td>
<td align ="right">Email Id</td>

<form action = "MailList.html" method="post">
<input type = "submit" value = "Return">

the jsp page is not displaying the retrieved values

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The first part of your address bar:

is a problem. It means the browser is not actually submitting to the JSP page.

Also, where is the question mark that separates the page name from the querystring?

should be
I agree. Here's the link:
subject: compiling jsp
It's not a secret anymore!