struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre BRARD <brard.pie...@gmail.com>
Subject Session variable setting
Date Thu, 20 May 2010 12:22:51 GMT
Hi all,

I am implementing a login system with Struts 2.

Basically, I have a custom interceptor which checks in session if a
particular variable is set. If it is, the user is considered already logged
in and if it is not the variable is set in session (
session.setAttribute("connectedUser", user); ).

Now, the problem is that this variable is null in my Action (through
SessionAware or not) or in my page (#session.myvar) during the first request
(when the variable is first set in session).
It is only gets set with the second request.

Am I missing an essential concept in the "page process and session
lifecycle" or is this a plain algorithm mistake ?

Thanks in advance for any help,
PBR

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message