Re: [s2]Would like each action to go throught my parent class

2007-04-20 Thread Mark Menard
On 4/18/07 10:35 PM, Drew Kutcharian [EMAIL PROTECTED] wrote: A little suggestion. Inside the interceptor, you can also put the User in the ActionContext or your own custom ThreadLocal so you can use that all over the stack for permissions/roles/etc as an alternative to say Acegi. In a

[s2]Would like each action to go throught my parent class

2007-04-18 Thread MLENEVEUT
Hi all, I would like to do as in Struts 1 with DispathAction : create a parent Action, which each other action extends, and each request/action passes by this parent action, and I could so add there the generic validations (user logged, etc...) How could I do ? I tried this : My parent

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: My parent Action : public class CRMAction extends ActionSupport @Override public String execute() throws Exception { //do all tests (user logged, ...) //... return super.execute(); } }

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread MLENEVEUT
I was talking about a dynamic mecanism. In Struts 1, I never called super.dispathMethod() : the CRMAction.dispatchMethod() was first called by Struts, then my return super.dispatchMethod() was returning the ActionForward returned by my called Action. public class CRMAction extends

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: I was talking about a dynamic mecanism. In Struts 1, I never called super.dispathMethod() : the CRMAction.dispatchMethod() was first called by Struts, then my return super.dispatchMethod() was returning the ActionForward returned by my called Action. That's

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Mark Menard
On 4/18/07 4:10 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How could I do ? Parent action: Public abstract class MyParentAction extends ActionSupport { public String execute () throws Exception { // do your security stuff. String result = this.myExecute (); //

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Drew Kutcharian
. www.venarc.com - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: user@struts.apache.org Sent: Wednesday, April 18, 2007 12:10:44 AM Subject: [s2]Would like each action to go throught my parent class Hi all, I would like to do as in Struts 1 with DispathAction : create a parent

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Mark Menard
On 4/18/07 11:11 AM, Mark Menard [EMAIL PROTECTED] wrote: Now, with that example shown, I wouldn't use it. Look at an interceptor to do this. I'm working on exactly this right now, a login interceptor. Stay tuned for a write up when I get done. As promised here's a fairly complete write up of

Re: [s2]Would like each action to go throught my parent class

2007-04-18 Thread Drew Kutcharian
Message From: Mark Menard [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, April 18, 2007 12:36:21 PM Subject: Re: [s2]Would like each action to go throught my parent class On 4/18/07 11:11 AM, Mark Menard [EMAIL PROTECTED] wrote: Now, with that example