tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WillF <>
Subject Re: mod_jk help!
Date Thu, 28 Aug 2008 14:44:14 GMT

What are some best practices surrounding explicitly specifying context path?
I remember reading somewhere that said it is ignored and should not be used?
Is there any truth to this?

Instead of mod_jk do you think mod_proxy would make things easier for
something like this?

Rainer Jung-3 wrote:
> WillF wrote:
>> I am currently using mod_jk as the connector and I have Apache as a front
>> for
>> tomcat5 by adding something like
>> JkMount /helloworld/* ajp13 to the httpd.conf
>> So when I go to
>> it forwards the request to tomcat and looks for the webapp who's context
>> path is helloworld. This is all fine and good
>> but what if i wanted something like
>> and i use JkMount /test/helloworld/* ajp13
>> how do i create the mapping then? Does it try to look for an app context
>> path of /test/helloworld?? In tomcat can you even have an web application
>> with that sort of path?
> Yes and yes.
> For multi-level context paths see e.g.
> and look out for the character "#".
>> Currently I have my Host container in server.xml set to, i
>> even tried to but i dont think that did anything.
> If you want to have a direct context path on the front end Apache then 
> on the backend Tomcat, you can rewrite Requests and Location headers 
> (Redirect) with mod_rewrite, but that's a little tedious and can be 
> easily broken by the webapp (which can then be fixed with even ,more 
> work with mod_substitute). Think twice, if you really need different 
> context paths on the frontend and on the backend.
> For the request rewriting and redirect/cookie manipulation, mod_proxy 
> might be in better shape then mod_jk (which has other strengths but not 
> especially this area), for the correction of wrong links embedded in 
> content, you might want to look ak mod_substitute, mod_sed or 
> mod_proxy_html (note: mod_proxy_html != mod_proxy_http).
> Regards,
> Rainer
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message