option.
Scott
-Original Message-
From: Pierre Thibaudeau [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 3:01 PM
To: Struts Users Mailing List
Subject: Re: getCookies at beginning of HttpSession
Thank you, Leon! In essence, you are confirming what I have been doing
until now. I
Thank you, Leon! In essence, you are confirming what I have been doing
until now. I don't have a "flag" as such, but it's similar to what you
suggest: I basically read the cookies and extract the relevant info that I
store in the session --- setAttribute(USER_PREFS, relevantInfoFromCookies).
F
It may sound weird, but will do the job perfectly:
At first request you read the cookies and put a flag into session,
that you already read them:
Action (best in a base action of course):
execute(HttpServlet req,
HttpSession session = req.getSession();
if (session.getAttribute(MY_COOKIE
I would like to read the cookies at the very beginning of a user's session,
in order (for example) to customize the presentation according to his
preferences from his previous sessions.
I imagine that overriding the sessionCreated() method of an
HttpSessionListener would be ideal for my purpose.
4 matches
Mail list logo