| 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.
|
 |
 |
|
|
subject: Error viewing JSP page
|
|
|