my dog learned polymorphism*
The moose likes Tomcat and the fly likes Context path in tomcat 5.5 problems with mod_jk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context path in tomcat 5.5 problems with mod_jk" Watch "Context path in tomcat 5.5 problems with mod_jk" New topic
Author

Context path in tomcat 5.5 problems with mod_jk

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
im doing migration from tomcat 4 to tomcat 5.5
im using apache 1.3 with mod_jk when I used tomcat 4 my app root was in different place and not in webapps directory
and I did the redirection with this simple tag in the server.xml
<Context path="" docBase="/bld/blah/Run/ " debug="0"/>
and all my web pages was working from this dir and jsp pages are redirected to tomcat
but now when I migrated to the new tomcat 5.5 I don�t see this tag any more ..
when I was reading about the new config I tried to add this server.xml


<Context docBase="/bld/blah/Run/ " path="/bld/blah/Run/" privileged="true" antiResourceLocking="false" antiJARLo
cking="false">
</Context>

but it doesn't work , what im doing wrong here?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The path attribute should be that part of the URL that the user would type just after the domain.

http://www.mydomain.com/myApp

You might want to get this up and running on Tomcat as a standalone before getting tangled up in connector issues.

Also, check with the Tomcat documentation.
The recommended best practice has changed now that they've introduced context fragments (The <Context ... /> portion of your server.xml file can now be placed in a separate file under conf/Catalina/localhost (or whatever host you're using) with the path as it's name.

Example: myApp.xml

Also, the path attribute is ignored.
Tomcat uses the file's name (minus the .xml) as the path.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Consider Paul's rocket mass heater.
 
subject: Context path in tomcat 5.5 problems with mod_jk
 
Similar Threads
servlet not running but examples does
configure a servlet in tomcat
Can�t load html from Tomcat
Multiple apps in Tomcat
tomcat can't find servlet class???