tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rees" <dree...@gmail.com>
Subject Re: Releasing JK 1.2.19
Date Wed, 13 Sep 2006 23:40:37 GMT
Ok, I'm pretty sure this is a real bug (though not a new one, mod_jk
back to 1.2.15 behaves the same).

I'm using this config in Apache:

JkMount /*.jsp tomcatlb
<LocationMatch "/.*;jsessionid=.*">
  JkMount tomcatlb
</LocationMatch>

The goal of this example to have Tomcat serve all .jsp files and URL
which looks like it has been rewritten with the session id.

But the problem is that the LocationMatch directive isn't parsed the
same by mod_jk as it is by Apache. You would expect that any URL which
matches the LocationMatch would immediately be sent to Tomcat, but
instead it appears to behave the same as a JkMount directive.

So the above configuration is handled the same as

JkMount /*.jsp tomcatlb
JkMount "/.*;jsessionid=.*" tomcatlb

Naturally since mod_jk strips off the jsessionid before matching, it
doesn't work.

Not to mention that the Apache Regexp doesn't work the same as a
JkMount expression. For example,

JkMount /*.jsp tomcatlb

does not behave the same as

<LocationMatch "/.*\.jsp">
 JkMount tomcatlb
</LocationMatch>

but does behave the same as

<LocationMatch "/*.jsp">
 JkMount tomcatlb
</LocationMatch>

This is very confusing if you were trying to use the LocationMatch for
example to set some other Apache directives you would not get the
result you expected.

The only way I know to get mod_jk to send *.jsp and anything with
;jsessionid in it to Tomcat and let Tomcat serve the other content is
to do a JkMount /* and then JkUnMount for all file types you can think
of, but that is a big hassle when you have a lot of virtualhosts to
configure and still doesn't quite let you do what you really want.

Bug 40151 is related to this issue.

It would be nice if you could set a JkMountJSessionId directive that
would automatically match any URLs which look like they have been URL
rewritten.

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message