This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat and HTTp Status 404 for JSP testing