I searched for this recently and found a solution.
If you just want to share the identifier, you can use the following configuration in web.xml. Given that you are using servlet 3.0.
<session-config> <cookie-config> <path>/</path> </cookie-config> </session-config>
This will save the jsessionid cookie with the // path, which will be used for all web applications. Here's how JBoss 4 did it.
sm4
source share