You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2006/09/17 14:45:01 UTC

mod_jk worker mappings and jsessionid

Hi,

in the last weeks, there were some discussions, about how to make mod_jk 
automatically map requests which are url encoded (;jsessionid=). 
Although in most cases it would be better to have a clear url structure 
which you can use with JkMount, I understand that sometimes it will be 
convenient to allow to forward all requests which contain a session id 
either in the url or in a cookie to the correct mod_jk worker.

In the following I'm only talking about apache.

Since a very long time mod_jk allowed to use "SetHandler 
jakarta-servlet" to be used e.g. in Location directives to forward 
requests via mod_jk without JkMount. But in this case, mod_jk always 
took the first worker in worker.list for these requests.

We now (in the new 1.2.19) added an environment variable JK_WORKER_NAME 
you can set in addition, to make mod_jk use the worker, whose name it 
finds in this variable.

You can set JK_WORKER_NAME for example using SetEnvIf or RewriteRule. 
Especially you can extract parts of the request uri to determine the 
worker name. In apache 2.2 you can also set the handler jakarta-servlet 
via RewriteRule.

Be careful, when you mix JkMount and JK_WORKER_NAME: JkMount will win. 
Only when mod_jk has been set as a handler via SetHandler 
jakarta-servlet and no worker name could be determined by JkMount, it 
will look for the value of the environment variable JK_WORKER_NAME.

The feature is shortly explained in the docs page docs/config/apache.html.

Feel free to comment on the feature. The release candidate for 1.2.19 is 
available under 
http://tomcat.apache.org/dev/dist/tomcat-connectors/jk/source/jk-1.2.19/ 
and contains more new features.

Regrads,

Rainer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org