All,

JkMount /myapp/*;jsessionid=* workerX
>
This particular directive seems to be ignored on my setup. I guess I'll just look at the module source and figure it out myself.

It turns out that mod_jk does not consider ";jsessionid=" part of the URL when it does matching. :(

From mod_jk.log:

[jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (500)]: Attempting to map URI '/app/includes/css/styles.css'
[jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match
[jk_uri_worker_map.c (486)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (500)]: Attempting to map URI '/app/images/select.gif'
[jk_uri_worker_map.c (618)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match

Both of these URLs definately have the session id attached to them.

jk_uri_worker_map.c::map_uri_to_worker contains the following code torards the beginning of the function:

char *url_rewrite = strstr(uri, JK_PATH_SESSION_IDENTIFIER);

        if(url_rewrite) {
            *url_rewrite = '\0';
        }
        jk_no2slash(uri);

So, they completely strip-out the sessionid before checking (JK_PATH_SESSION_IDENTIFIER = ";jsessionid").

My conclusion is that there's no support for this kind of think in mod_jk. The following matches are supported (from the code docs):

"
* Exact Context -> /exact/uri=worker e.g. /examples/do*=ajp12             *
* Context Based -> /context/*=worker e.g. /examples/*=ajp12               *
* Context and suffix ->/context/*.suffix=worker e.g. /examples/*.jsp=ajp12*
"

It's not a simple fix to add the kind of checking I'm talking about. I'll poke around to find out how this might be done.

If there are any mod_jk hackers on the list reading this thread, please let me know. Also, if anyone knows if this works in other connectors (i.e. jk2), please let me know.

I'm putting all of this in a post so that it gets into the archives.

I'm also adding this sentence to help out with searches: The problem is with jsessionid, Apache, mod_jk and is most often characterized by broken images and failure to load stylesheets when URLs are encoded in Java doe these resources.

Thanks,
-chris

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to