ActionInvocation.getInvocationContext().getSession() or final HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST); HttpSession session = request.getSession();
will do it in an interceptor. The latter assuming you are implementing StrutsStatics in the interceptor. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: Brad A Cupit <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <user@struts.apache.org> > Date: Wed, 30 Apr 2008 11:40:49 -0500 > To: Struts Users Mailing List <user@struts.apache.org> > Subject: RE: Best way to access Session with regards to cluster > >> but I still have some confusion about the proper way to do >> this so that my session values will be available and >> replicated properly in a cluster environment. > > The Struts 2 session maps are actually just wrappers around the real > underlying session. The methods that return (or set) a > HttpServletRequest should provide the actual http session. > > Basically, once you have setup replicated sessions in your app server, > Struts 2 should work with it automatically, no matter which method you > choose to get the session. > > I believe implementing SessionAware is the recommended approach, as it > doesn't tie your actions to the servlet api (making them more portable > and easier to test). > > Not sure about getting the session in an interceptor though... > > Brad Cupit > Louisiana State University - UIS > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.