[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Re: Session in Interceptors
From: Maurizio Cucchiara <maurizio.cucchiara () gmail ! com>
Date: 2011-07-27 15:15:44
Message-ID: CANrzj0k+zAqLhZ6K5MpcQ+ws4OJNZrUUP8P8hOCyCoWYBRyKpg () mail ! gmail ! com
[Download RAW message or body]
Try something like
HttpSession session = ServletActionContext.getRequest().getSession();
On 27 July 2011 17:10, Eric Lentz <Eric.Lentz@sherwin.com> wrote:
> In an interceptor I have a need to store a value in the session. I can see
> a session map that I find in the invocation's object graph that is
> available in the interceptor, but storing back to the map has no effect.
> Is there a "Struts 2 way" to get/set the session within an interceptor or
> do I just do something like this?
> HttpServletRequest request = (HttpServletRequest)
> context.get(StrutsStatics.HTTP_REQUEST);
> HttpSession session = request.getSession(true);
> //set session as needed
>
--
Maurizio Cucchiara
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic