wood burning stoves
The moose likes Tomcat and the fly likes Context path question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context path question" Watch "Context path question" New topic

Context path question

Sam Sal

Joined: May 11, 2006
Posts: 1
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"/>
Did not work

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

Please help.

Thanks and Regards
[ May 11, 2006: Message edited by: Bear Bibeault ]
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

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 -

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.

[ May 14, 2006: Message edited by: Sonny Gill ]

The future is here. It's just not evenly distributed yet. - William Gibson
Sonny Gill LinkedIn
I agree. Here's the link: http://aspose.com/file-tools
subject: Context path question
It's not a secret anymore!