Hi folks,
I've got a question regarding session management in GWT. I'm building
an application which has several servlets. When entering the
application the application calls the so-called 'security servlet',
retrieves the userid of the request and stores this in the session
using the following code:
getThreadLocalRequest().getSession().setAttribute(label, val);
Eventually the user invokes more servlets of the applications. However
when I'm retrieving the userid from the session in those servlets
using
protected Object getFromSession(String label) {
HttpServletRequest request = getThreadLocalRequest();
if (request != null) {
HttpSession session = request.getSession();
if (session != null)
return session.getAttribute(label);
}
return null;
}
the application returns null. During debugging I found out the
sessionid of the sessions were different.
My question is: how can I manage the session information over several
request. I've the idea that using sessions is correct, however how can
I make sure the right session is used. I've already tried to increase
the time out.
Kind regards,
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.