Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Context path question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm very new to Tomcat (started today ) though I do have some experience in Weblogic. Have a question regarding context in Tomcat. Please help

I've installed Tomcat 5.5 in Windows 2000 Professional machine.

I have a jsp Test.jsp placed under the folder C:\check in my Windows machine. When I give http://localhost:8080/Test.jsp , the above page should be shown.

Can anyone help me on what and where to give the configuration setting.

I tried editing ${catalina.home}\conf\context.xml
Tried <Context path="/" docBase="C:\check" reloadable="true"> - did not work
Tried <Context path="" docBase="C:\check" reloadable="true"> - did not work

I tried editing ${catalina.home}\conf\server.xml

Tried <ContextManager debug="0">
<Context path="/" docBase="C:\check" debug="0" reloadable="true"/>
</ContextManager>
Did not work

Tried <ContextManager debug="0">
<Context path="" docBase="C:\check" debug="0" reloadable="true"/>
</ContextManager>
Did not work

Please help.

Thanks and Regards
Sam
[ May 11, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sam,

In Tomcat 5 and later, the recommended way of defining a context is iby creating an xml file in Tomcat/conf/Catalina/localhost.

Have you looked at the Tomcat context configuration documentation yet -
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Anyway, since you are just beginning with Tomcat, I suggest that you verify that on installation, the default root context and Jsp and servlet examples are working. Have a read of the documentation page I pointed to. Then come back here if you are still having problems.

[EDIT] - Oh, and many times when a context does not initialize properly in Tomcat, clues to underlying cause can be found in the localhost*.log file in Tomcat/logs directory.

HTH
[ May 14, 2006: Message edited by: Sonny Gill ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic