The session ID propagation of a particular web application depends on the platform and configuration of server or the application.

In J2EE/Servlet/JSP “world” it uses JSESSIONID cookie or jsessionid URL suffix, however it is possible to override the defaults. Also the configuration may disable the cookie method or the URL suffix method.

PD4ML supports the following methods of session ID propagation.

Let’s say we load http://pd4ml.com

  1. pd4ml.setCookie( “JSESSIONID”, cookieValue );

    where cookieValue is something like that: “9034657927465;path=/”

    The cookie is sent with the “main” request to http://pd4ml.com as well as with the requests to the referenced resources (images, CSSs etc)

  2. pd4ml.setSessionID( sessionID )

    In the case PD4ML embeds the sessionID only to referenced resource URLs this way:


    If it fails with the embedded jsessionid, it repeats the request without the ID.

    NOTE: It does not embed jsessionid to the original request to http://pd4ml.com, as you have control over the URL string in your Java code, so you can ebbed it by yourself and avoid possible confusions with the request repeating.

    You may see the modified image URLs on STDOUT or in the server log if you switch the debug mode on:


    The default “jsessionid” keyword can be changed with
    JVM command line parameter.