aspose file tools*
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
Author

compiling jsp

Vasantha Ajjampudi
Greenhorn

Joined: Jul 08, 2002
Posts: 5
Hi
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
Marshal

Joined: Jan 10, 2002
Posts: 61209
    
  66

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

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

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


BJ - SCJP and SCWCD
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
Greenhorn

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
Greenhorn

Joined: Jul 08, 2002
Posts: 5
Hi

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

file:///C:/servjsps/showmail.jspfname=john+&lname=smith&email=john@hotmail.com

jsp code:

<html>
<head>
<Title>Displaying Details</Title>
</head>
<body>
<%
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">
<tr>
<td align ="right">First Name</td>
<td><%=firstName%></td>
</tr>
<tr>
<td align ="right">Last Name</td>
<td><%=lastName%></td>
</tr>
<tr>
<td align ="right">Email Id</td>
<td><%=mailId%></td>
</tr>
</table>

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


the jsp page is not displaying the retrieved values

thanks
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The first part of your address bar:
file:///C:/

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?

showmail.jspfname
should be
showmail.jsp?fname
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compiling jsp