wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat and HTTp Status 404 for JSP testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat and HTTp Status 404 for JSP testing " Watch "Tomcat and HTTp Status 404 for JSP testing " New topic
Author

Tomcat and HTTp Status 404 for JSP testing

mikejjhao
Greenhorn

Joined: Sep 28, 2002
Posts: 3
Hi there,
I got this strange error:
I created two folder under the webapps dir of tomcat, one is ch03/jsp/, and the other is ch04/jsp. I put the same file, like first.jsp file in these two jsp folders, and I used the following URL to invoke the jsp file:
http://localhost:8080/ch03/jsp/first.jsp
The first.jsp file can be loaded by the browser.
But if I change the ch03 to ch04, I got the error, said:
type Status report
message /ch04/jsp/first.jsp
description The requested resource /ch04/jsp/first.jsp) is not available.
Does anyone know the reason? Thanks a lot.
srinivasan ganesan
Ranch Hand

Joined: Mar 09, 2001
Posts: 54
Do you ch04 in your context path?
mikejjhao
Greenhorn

Joined: Sep 28, 2002
Posts: 3
where to set the context path? Thanks.
srinivasan ganesan
Ranch Hand

Joined: Mar 09, 2001
Posts: 54
It should be set in server.xml under "Host".
Here's a sample..
<Context path="/ch04" docBase="ch04" debug="0" reloadable="true">
Hope this helps..
mikejjhao
Greenhorn

Joined: Sep 28, 2002
Posts: 3
yeah, you are right. that's a great help.
you know what, it's really exciting thing to know that there is an expert out there.
thanks.
-- mike
 
Consider Paul's rocket mass heater.
 
subject: Tomcat and HTTp Status 404 for JSP testing
 
Similar Threads
HTTP Status 404 error in tomcat
TOMCAT JSP not runing
How to see my html file in my own directory
tomcat servlet runing problem
Newbie question