Problem: Loosing Session Data in WML/Struts App

G

gilgantic

I am having an issue with loosing session data on a Struts/WML
application. I add the logged on user to the current session
(HttpSession) in my LoginAction using the following code:
session.setAttribute("USER", user);
But when I retrieve the user in my following SetupAction class:
User user = (User)session.getAttribute("USER");
it gives a NullPointerException, because the
'session.getAttribute("USER");' returns null. Also, my session variable
is initialized to:
HttpSession session = request.getSession(false);
I use JSP which generate WML code when compiled. Is there something in
my WML, Struts, or etc. which could clear session data?

Any suggestions are welcomed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top