I'm having a situation where I'm using Toolkit and try to pass bean info from a servlet into the session, but when I go from .jsp -> servlet -> .jsp the info is not in the correct session (in fact the session.getId values between the servlet and the last .jsp page are different). I get from the first .jsp page to the servlet fine. The servlet performs a query and obtains the correct results fine. If I do a getValue from the query results and System.out.println them, they work fine. However, if I try to do a putValue(beanname, beaninfo) and redirect to another .jsp page, the redirect works but the .jsp page getValue() finds nothing. Any info or suggestions greatly appreciated.
Session tracking does work with url encoding see HttpServletResponse.encodeUrl(). This includes the session ID in any subsequent servlet call ie. ensures next servlet call is within the context of the original session.
Alternatively, add the session id to a url manually with :
"&nwssid=" + whatever your session ID is.