> Welcome to the list. Hey, you posted your relevant environment details,
> a clear description of your problem, and admitted that the problem might
> be your own code. What more could we ask for? :)
 
Thank you for the warm welcome and the fast reply :-)

> The most likely problem is that you are not properly encoding the URLs
> that reference images. You see this problem a lot with page authors who
> always have cookies enabled in their browsers, because it's easy to
> forget. You have to encode your URLs properly if you want session
> stickiness to work. Here's how:
> 
> <img src="<%= request.getContextPath() %><%=
> response.encodeURL("/path/to/my/image.png") %>" />
> 
> This will add the ";jsessionid=..." parameter (along with the jvmroute)
> to the image's URL, ensuring that it is sent to the right back-end server.
> 
> There are various tag libraries that properly-format URLs in this way so
> you don't have to remember to do it yourself. Also, if you are using
> some other output technology (Velocity, Freemarker, etc.), similar tools
> should be available for those. 

We are using Cocoon and its EncodeUrlTransformer to do the session ID encoding:

<map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" 
pool-max="${encodeurl-transformer.pool-max}" 
src="org.apache.cocoon.transformation.EncodeURLTransformer">
        
<include-name>.*/@href=|.*/@action=|frame/@src=|img/@src=|input/@src=</include-name>
        
<exclude-name>nonexistinghtmlelement/@nonexistingattribute=</exclude-name>
</map:transformer>

As I wrote before this seems to be working fine for most devices. They either 
use cookies for all requests or all urls are beeing rewritten to include the 
session ID.

And this is part of our problem: we cannot recreate the issue locally to debug 
it. We just see some 404s in the mod_jk logs from time to time.

Greetings,
Timo

Reply via email to