RE: Right way to extends Action

2003-04-01 Thread Van Riper, Mike
-Original Message- From: V. Cekvenich [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 5:58 PM To: [EMAIL PROTECTED] Subject: Re: Right way to extends Action What about DispatchAction and LookupDispatchAction? Anyone have a good solution for reuse of common action logic

Re: Right way to extends Action

2003-03-31 Thread Xavier Saint-Denis
Hi, In our application we use a similar concept : - we have a class like this : public abstract class BaseAction extends Action In this class : - we added some usefull field like a logger an a pointer to a singleton that retains application's data protected Log log =

RE: Right way to extends Action

2003-03-31 Thread shirishchandra.sakhare
{ handleErrors(request, errors); } return result; } -Original Message- From: Xavier Saint-Denis [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 2:21 PM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hi, In our

RE: Right way to extends Action

2003-03-31 Thread Dario Geier
:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 3:21 PM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hi, In our application we use a similar concept : - we have a class like this : public abstract class BaseAction extends Action In this class : - we added some usefull

RE: Right way to extends Action

2003-03-31 Thread Kris Schneider
: Re: Right way to extends Action Hi, In our application we use a similar concept : - we have a class like this : public abstract class BaseAction extends Action In this class : - we added some usefull field like a logger an a pointer to a singleton that retains application's data

Re: Right way to extends Action

2003-03-31 Thread Xavier Saint-Denis
- Original Message - From: Dario Geier [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 31, 2003 2:41 PM Subject: RE: Right way to extends Action I would change the signature of the executeAction method not to throw Exception, but a custom

RE: Right way to extends Action

2003-03-31 Thread Dario Geier
Ho Xavier, so, how do you know which exception are thrown? You'll discover them at runtime :( -Original Message- From: Xavier Saint-Denis [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 5:40 PM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hi, Why have

Re: Right way to extends Action

2003-03-31 Thread Xavier Saint-Denis
PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 31, 2003 4:41 PM Subject: RE: Right way to extends Action Ho Xavier, so, how do you know which exception are thrown? You'll discover them at runtime :( -Original Message- From: Xavier Saint-Denis [mailto:[EMAIL

RE: Right way to extends Action

2003-03-31 Thread Dario Geier
:22 PM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hum... To my modest opinion, this is how Struts is designed. The execute method of the Action class raise Exception. For exemple when I implement an action that can raise an IdentificationException, I have to register

Re: Right way to extends Action

2003-03-31 Thread Xavier Saint-Denis
file so as to redirect the response accordingly. Regards, Xavier - Original Message - From: Dario Geier [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, March 31, 2003 5:32 PM Subject: RE: Right way to extends Action Yes, I know that, but still

RE: Right way to extends Action

2003-03-31 Thread Dario Geier
Subject: Re: Right way to extends Action For example, in my BaseAction class, when we verify that the user is logged in : if this is not the case, = throw new IdentificationException(); In the Struts config file (or locally to the action) we add : global-exceptions exception type

RE: Right way to extends Action

2003-03-31 Thread Van Riper, Mike
-Original Message- From: Xavier Saint-Denis [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 4:21 AM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hi, In our application we use a similar concept : - we have a class like this : public abstract

Re: Right way to extends Action

2003-03-31 Thread Igor Shabalov
: Xavier Saint-Denis [mailto:[EMAIL PROTECTED] Sent: Monday, March 31, 2003 4:21 AM To: Struts Users Mailing List Subject: Re: Right way to extends Action Hi, In our application we use a similar concept : - we have a class like this : public abstract class BaseAction extends Action What about

Re: Right way to extends Action

2003-03-31 Thread V. Cekvenich
- we added some usefull field like a logger an a pointer to a singleton that retains application's data protected Log log = LogFactory.getLog(this.getClass()); protected static final Infos infos = Infos.getInstance(); Be aware that adding other properties to Action is not thread safe. .V

Re: Right way to extends Action

2003-03-31 Thread V. Cekvenich
What about DispatchAction and LookupDispatchAction? Anyone have a good solution for reuse of common action logic across these multiple action base classes provided by Struts? I wrote my own dispatch:

Re: Right way to extends Action

2003-03-31 Thread Navjot Singh
thanks buddy, got the idea now. My problem is solved. -navjot The programming world now seems to be all about writing wrapper codes ;-) - Original Message - From: V. Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 7:27 AM Subject: Re: Right way to extends