Meaningless Drivel is fun!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context path question" Watch "Context path question" New topic
Author

Context path question

Sam Sal
Greenhorn

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"/>
</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

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 -
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 ]

The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context path question
 
Similar Threads
IIS and TOMCAT
Root Context - mywebapps has no effect
tomcat and web pages
tomcat context
Need Help running Tomcat 5.0.28 on OS X