Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble with first simple JSP  RSS feed

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • 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.
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!