Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Ganesh
Hello all, I am using Struts 1.0.2. I want to access session objects in a class other than Action. Is there any way to acheive it rather than passing the information via parameter to each and every function? Regards Ganesh

Re: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Dave Newton
On Apr 7, 2011 5:48 AM, Ganesh wrote: I am using Struts 1.0.2. Good lord why? I want to access session objects in a class other than Action. Is there any way to acheive it rather than passing the information via parameter to each and every function? You could create a thread local and access

Re: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Brian Thompson
On Thu, Apr 7, 2011 at 7:05 AM, Dave Newton davelnew...@gmail.com wrote: On Apr 7, 2011 5:48 AM, Ganesh wrote: I am using Struts 1.0.2. Good lord why? Legacy code, I'll wager. If he were building something brand-new, it would be a no-brainer to use Struts 2. -Brian

Re: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Massimo Ugues
I want to access session objects in a class other than Action. You have to pass the ServletRequest object or the Session object to the instance of that class. Mazi On Thu, Apr 7, 2011 at 2:24 PM, Brian Thompson elephant...@gmail.comwrote: On Thu, Apr 7, 2011 at 7:05 AM, Dave Newton

Re: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Dave Newton
On Thu, Apr 7, 2011 at 9:25 AM, Massimo Ugues wrote:  I want to access session objects in a class other than Action. You have to pass the ServletRequest object or the Session object to the instance of that class. Please don't. Doing so ties the dependent classes to either Struts or the

RE: Accessing session objects other than action in Struts 1.x

2011-04-07 Thread Mahendru, Ajay
We used thread local when we wanted something similar.. But now we have shifted to Struts 2 and so everything is on the ActionContext and hence accessible.. -Original Message- From: Massimo Ugues [mailto:m.ug...@gmail.com] Sent: Thursday, April 07, 2011 7:25 AM To: Struts Users Mailing

Wildcard pattern not calling interceptor?

2011-04-07 Thread Dave Shevett
I have an app that uses a generic interceptor on all action calls to verify if the session is active, and if it isn't, it returns 'notloggedin', which I have a global result for. This works -great-, except for one of my actions, which is a generic loader for JSP's. The interceptor