Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context path question

 
Sam Sal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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 ]
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic