first solution, according to rémy :
1/ this is non portable and is an hack
2/ this can be accomplished using a wrapper that returns a session that returns the id we need to force.
another solution is to maintain a session on the client side using the soap layer.
Ok, so if you are dispatching to another context (otherwise, it won't work), you should:
- wrap the request
- have the wrapper override getSession
- the object returned should be your own HttpSession impl, which would return the desired session id as a result of its getId method
It probably works, but isn't going to work on other containers.