File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Error viewing JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error viewing JSP page" Watch "Error viewing JSP page" New topic
Author

Error viewing JSP page

Anil Jain
Ranch Hand

Joined: Mar 10, 2002
Posts: 51
Friends!!
I have made a simple.jsp file in follwing directory structure
webapps/myJSPApp/simple.jsp
But when I try to access thru
http://localhost:8080/myJSPApp/simple.jsp
I get the message that fil not found
Am I doing something fundamentally wrong or do i need to change any classpath or path.
Please advise,
Thanks


Anil Jain<br />Sun Certified Java(2) Programmer
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Check if you have your webapp defined in $CATALINA_HOME/conf/server.xml as
<Context path="/myJSPApp" docBase="myJSPApp" debug="0" reloadable="0"/>
Anil Jain
Ranch Hand

Joined: Mar 10, 2002
Posts: 51
Hi Anthony!!
I don't have any such entry in server.xml file what am i suppose to do now??
And one more thing my servlet example are running fine and other jsp files that came along tomcat are also running fine.
how do I set it up.
Thanks,
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
You have to define your context in the server.xml file. You are in effect "registering" your web application and the context mapping with Tomcat, so that the container will understand the context path in the request URL.
[ June 24, 2002: Message edited by: Anthony Villanueva ]
Anil Jain
Ranch Hand

Joined: Mar 10, 2002
Posts: 51
I can define this path anywhere in server.xml file??
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
The Tomcat link pretty much explains it, but if you're in a hurry just insert the context tag
<Context path="/myJSPApp" docBase="myJSPApp" debug="0" reloadable="0"/>
just below these lines:

Just make sure you back up any configuration files before you manually edit them (just in case, you know ), and restart Tomcat.
HTH
Anil Jain
Ranch Hand

Joined: Mar 10, 2002
Posts: 51
Hey Anthony!!
Thanks a lot . My jsp pagez are working now. I appreciate your knowledge and help.

Thanks again,
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
Glad I could help . You might find Core Servlets and JSPs a helpful reference. It's a bit old, but I still consider it a very useful source.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error viewing JSP page
 
Similar Threads
can not see tomcat localhost page when disconnect from internet or lan
Error when deploying application in WAS ae 4.0
my first jsp can not display(http status 500)
HttpStatus 400 problem
how to run jsp?