• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help!Tomcat 5 server  RSS feed

 
sripriya krishnan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to run my first jsp page using Tomcat server 5.I have also installed j2sdk1.4.2 and j2sdkee1.4 which has the Tomcat server along with it
I have given http://localhost:8000/myjspfiles/Simple.jsp
I have created myjspfiles directory under webapps directory,but I get the following error.
HTTP Status 404 - /myjspfiles/SimpleBean.jsp
--------------------------------------------------------------------------------
type Status report
message /myjspfiles/SimpleBean.jsp
description The requested resource (/myjspfiles/SimpleBean.jsp) is not available.

--------------------------------------------------------------------------------
Apache Tomcat/5.0
Can any one ps help me what is the problem
Thanx in advance
priya
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know Tomcat 5 yet, but it looks like you have to make myjspfiles known with a context-path entry in server.xml
hth
 
sripriya krishnan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Tnak you. when I opened my server.xml
<!-- The Default DocRoot -->
<Context path="" docBase="" debug="0"/>
the context path is empty should I have to specify my directory location here.
Thanks again,it will be helpful if I am able to run the my first jsp file.
Priya
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't Tomcat 5 provide extensive examples of both servlet and JSP? Study how the examples "web applications" are defined in server.xml and web.xml.
Bill
 
Chris Baron
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want myjspfiles as defaultroot you change this line:
<!-- The Default DocRoot -->
<Context path="" docBase="myjspfiles" debug="0"/>
An request for http://localhost:8000 would then be directed to /myjspfiles/index.html
If myjspfiles is rather a test-webapp and you prefer to keep ROOT as Default DocRoot, add a line for myjspfiles:
<!-- The Default DocRoot -->
<Context path="" docBase="" debug="0"/>
<Context path="/myjspfiles" docBase="myjspfiles" debug="0"/>
cb
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!