tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Mod jk selective forwarding performance problem
Date Mon, 06 Aug 2007 17:44:50 GMT
Hash: SHA1


Bill Bainbridge wrote:
> I'd like to have
> Apache serve the images, stylesheets and other static content that is
> referenced in the Struts jsps, but when I try to do that, if the page
> isn't cached in the browser, it comes up with no buttons (from the
> images/ directory) until I click the browser's "Refresh" icon; then
> it shows up again with all the buttons.

This is because your application is (correctly) adding the URL-encoded
jsessionid parameter to the URL. For some reason, the Apache httpd team
doesn't want to follow the HTTP specification regarding this point and
accept ; as a valid parameter delimiter (like ? and &).

There are at least two ways to fix this:

1. Use mod_rewrite. The magic incantation I used to use was:

   RewriteRule /appName/(.*);jsessionid=[0-9A-Z]*(.*) \
               /path/to/your/webapp/$1$2 [L]

Note that the RewriteRule is all on one line of text; I used "\" to
separate them for readability.

2. Since you're using mod_jk, you can use:

   JkStripSession On

This should strip session identifiers from URLs that /will not/ be sent
to Tomcat. This is super helpful since working with mod_rewrite can be
daunting, especially in complex configurations. You'll need mod_jk
version 1.2.21 or later to use the feature.

Hope that helps,
- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message