Hi,

for a GWT application, I need a user management servlet, thus I am
setting an attribute for a session in which the current user is stored
(like this:

HttpSession session = getThreadLocalRequest().getSession(true);
session.setAttribute("user", "myUserName");

Now, I do have a different service, which I use to display some data.
When I click on a button on the client side, the data is displayed
correctly -- in about 59 of 60 cases. If I click the button often
enough, at one point, the following code will _not_ work:

HttpSession session = getThreadLocalRequest().getSession();
String userName = (String) session.getAttribute("user");

and at this point, userName suddenly is null!
As I said, most of the time, the code above works, but sometimes, it
doesn't... Why?

Also: I have printed the session id to the screen: It is correct (i.e.
always the same) as long as the above code works, but in the failure
case, the session id suddenly is different (although I am positive
that I neither started a new session nor asked GWT to do so...).

Any ideas? Do you need more information? What am I doing wrong?

Thanks for your help!
Philipp
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to