• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error viewing JSP page

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can define this path anywhere in server.xml file??
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Anthony!!
Thanks a lot . My jsp pagez are working now. I appreciate your knowledge and help.

Thanks again,
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic