tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: mod_jk: confirming JKStripSession setting
Date Tue, 06 Apr 2010 22:11:16 GMT
On 06.04.2010 17:02, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> On 4/6/2010 10:49 AM, Christopher Schultz wrote:
>> 98.218.200.175 - - [06/Apr/2010:14:46:52 +0000] "GET
>> /context/;jsessionid=FA8E3DA6A38E3CF07370658FA759A454/images/help_widget.gif
>> HTTP/1.1"
>
> So, I was trying to generate some content using Javascript yet pass-in
> all the elements of the URL to the javascript so I wouldn't have to
> either hard-code context paths into the Javascript or use a dynamic
> javascript source.
>
> Anyhow, I had done something like this:
>
> function foo(..., contextPath, ...) {
> }
>
>
> foo(..., '<%= response.encodeURL(request.getContextPath()) %>', ...)
>
> That, of course, gives me a contextPath that looks like
> "/context/;jsessionid=...." and then appending paths onto it breaks
> everything.
>
> So, I now have split things up like this:
>
> function foo(..., contextPath, pathSuffix, ...) {
>    ...
>
>    // build a URL
>
>    var url = contextPath + '/images/help_widget.gif' + pathSuffix;
>    ...
> }
>
> ... and passing request.getContextPath() as the first argument and then
> passing response.encodeURL(".").substring(1) as the second argument. A
> bit of a hack, but it'll work.

Good to know what the reason was and that you have a workaround. 
JkStripSession indeed can only strip trailing session info.

Regards,

Rainer

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


Mime
View raw message