• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

compiling jsp

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As this is a Tomcat setup issue, moving to the Tomcat forum.
[ September 08, 2004: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You only need to put jsp in Tomcat app (example webapp for example) and run it from browser, Tomcat will compile it.
 
Vasantha Ajjampudi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 once met a man from Nantucket. He had a tiny ad
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic