• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Context path in tomcat 5.5 problems with mod_jk

 
Ranch Hand
Posts: 602
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!