• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble with first simple JSP

 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried using the following HTML in a file called "First.jsp"
<html>
<body>
the date is <%=new java.util.Date()%>
</body>
</html>
I don't get anything from the code inside of the "<%= %>" tag. Is there something I'm doing wrong. I'm not sure of what servlet engine is used on the server but there is a servlet directory which is a direcory above the directory with my "First.jsp" file. Does it matter which directory I put it in? As I said this is my first shot at JSP so any help would be appreciated.
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. There are specific distinct dirs for sevlets and jsps. Which servlet engine are you using. Please tell us which dir , (whole physical path) you copied your first.jsp and how did you invoke from browser.
Everyone strugles to get the first jsp working properly. It is just that which file goes where. Then onwards you will enjoy!
regds
maha anna
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using the iplanet web server4.1. My first.jsp file is in the directory /opt/software/www/rphelps
There's a servlet directory located at /opt/software/www/servlet
First I tried invoking the first.jsp by just going to the page by entering the URL in my browser. Next I tried going to another page and clicking on a link that sent me to the first.jsp page and both times I received a message saying that "There is a problem with the page you are trying to reach and it can't be displayed". I think I might have to configure the server to use JDK instead of JRE so I'm gonna look into that and I'll let you know if I had any luck.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic