The functionality that I need right now is to define an error page for each "section" (namespace) of my site. So if an uncaught exception occurs in any Action or view within that section an error handling action will be executed.
Handling exceptions from within execute() is not good enough. The power of OGNL is a blessing and a curse because it allows fairly complex "scripting" in the view layer. This can often result in exceptions being thrown from the view which may need to be caught and handled in the *same* way as exceptions thrown from its respective Action. I agree that this functionality does not belong in XWork. An interceptor may be a good place to implement it. I think that the reason that the existing functionality (servlet exception handler) is not enough here is that it allows no integration with the framework. As far as implementing this behaviour in an interceptor is concerned - how does this approach sound: ExceptionHandlerInterceptor catches all Exceptions and checks to see if the invocation has been executed. If so then the exception must have been thrown by another interceptor so just log it and do nothing (result has already finished executing). Otherwise, use the ActionProxy to create the ERROR result and execute it. This way I can define either an error page for a particular action or a global error page for an entire package. Are there any problems with this approach? John. ----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 02, 2003 8:29 PM Subject: RE: [OS-webwork] Exception handler proposal I agree here.. If someone wants this, it can be implemented as an Interceptor anyway... > -----Original Message----- > From: Joseph Ottinger [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 02, 2003 12:31 PM > To: [EMAIL PROTECTED] > Subject: Re: [OS-webwork] Exception handler proposal > > > Then wouldn't it be the invoker's responsibility, rather than > the framework's? I'd say that exceptions should be delegated > to the most responsible party, not the framework. Thus, the > web app exception handler, or the caller's, in the case of XWork's. > > On Sun, 2 Nov 2003, Francisco Hernandez wrote: > > > for people using xwork outside of servlet containers > > > > Patrick Lightbody wrote: > > > I still don't understand why using the Servlet's support isn't > > > enough? > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > On Behalf > > > Of Fred Lamuette > > > Sent: Sunday, November 02, 2003 2:14 AM > > > To: [EMAIL PROTECTED] > > > Subject: RE: [OS-webwork] Exception handler proposal > > > > > > So a a generic exception handler like this one : > <global-exception > > > type="java.lang.Exception" > action="genericExceptionHandlerAction"/> > > > could handle any exception and could do what you want. > > > Cheers. > > > Richard HALLLIER. > > > > > > -----Message d'origine----- > > > De : [EMAIL PROTECTED] > > > > [mailto:[EMAIL PROTECTED] la part > > > de John Patterson Envoyé : samedi 1 novembre 2003 23:46 > > > À : [EMAIL PROTECTED] > > > Objet : Re: [OS-webwork] Exception handler proposal > > > > > > > > > It would be nice to be able to specify an error page based on URI > > > pattern. eg any error that occurs with a uri matching > > > "/action/flight*" gets forwarded/redirected to the action > > > "flightError". > > > > > > ----- Original Message ----- > > > From: "Fred Lamuette" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Saturday, November 01, 2003 9:44 AM > > > Subject: RE: [OS-webwork] Exception handler proposal > > > > > > > > > > > >>If this functionality exists it MUST be part of the webapp > > >>framework. > > > > > > As > > > far > > > > > >>as I am concerned, I prefer a WW2-centric approach. In this > > >>viewpoint, > > > > > > you > > > > > >>could consider taking advantage of the fully functionnal > framework > > >>to > > > > > > handle > > > > > >>exceptions. > > >>You could forward DIRECTLY to an action, manage different result > > >>types (action, jsp, velocity,...), and so on. Cheers. > > >> > > >>Richard HALLIER > > >>Chef de projet > > >>[EMAIL PROTECTED] > > >>01.40.12.41.52 > > >>www.uniclick.org > > >>UNICLICK > > >> > > >> > > >>-----Message d'origine----- > > >>De : [EMAIL PROTECTED] > > > >>[mailto:[EMAIL PROTECTED] la part > > >>de Hani Suleiman Envoye : samedi 1 novembre 2003 04:30 > > >>A : [EMAIL PROTECTED] > > >>Objet : Re: [OS-webwork] Exception handler proposal > > >> > > >> > > >>Err, why on earth would you want this in webwork? What's > wrong with > > > > > > the > > > > > >>exception handlers you can specify in web.xml, which work > exactly as > > >>described below? > > >> > > >>On Oct 31, 2003, at 10:18 PM, Jason Carreira wrote: > > >> > > >> > > >>>Nope... Interesting idea... Post a Jira issue for it... > > >>> > > >>> > > >>>>-----Original Message----- > > >>>>From: Fred Lamuette [mailto:[EMAIL PROTECTED] > > >>>>Sent: Friday, October 31, 2003 3:00 PM > > >>>>To: [EMAIL PROTECTED] > > >>>>Subject: [OS-webwork] Exception handler proposal > > >>>> > > >>>> > > >>>>Is there an exception handler mechanism in xwork ? > Something like > > >>>>: <global-exception > > > > > > type="mypack.ApplicationException" > > > > > >>>>action="myExceptionHandlerAction"/> > > >>>>that could redirect exceptions inherited from > > >>>>mypack.ApplicationException to the > myExceptionHandlerAction action > > >>>>? Cheers. > > >>>> > > >>>>Richard HALLIER > > >>>>Chef de projet > > >>>>[EMAIL PROTECTED] > > >>>>01.40.12.41.52 > > >>>>www.uniclick.org > > >>>>UNICLICK > > >>>> > > >>>> > > >>>> > > >>>> > > >>>>------------------------------------------------------- > > >>>>This SF.net email is sponsored by: SF.net Giveback > Program. Does > > >>>>SourceForge.net help you be more productive? Does it > > >>>>help you create better code? SHARE THE LOVE, and help us help > > >>>>YOU! Click Here: http://sourceforge.net/donate/ > > >>>>_______________________________________________ > > >>>>Opensymphony-webwork mailing list > > >>>>[EMAIL PROTECTED] > > > >>>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > >>>> > > >>> > > >>> > > >>>------------------------------------------------------- > > >>>This SF.net email is sponsored by: SF.net Giveback Program. Does > > >>>SourceForge.net help you be more productive? Does it > > >>>help you create better code? SHARE THE LOVE, and help us help > > >>>YOU! Click Here: http://sourceforge.net/donate/ > > >>>_______________________________________________ > > >>>Opensymphony-webwork mailing list > > >>>[EMAIL PROTECTED] > > >>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > >>> > > >> > > >> > > >> > > >>------------------------------------------------------- > > >>This SF.net email is sponsored by: SF.net Giveback Program. Does > > >>SourceForge.net help you be more productive? Does it > > >>help you create better code? SHARE THE LOVE, and help us help > > >>YOU! Click Here: http://sourceforge.net/donate/ > > >>_______________________________________________ > > >>Opensymphony-webwork mailing list > > >>[EMAIL PROTECTED] > > >>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > >> > > >> > > >> > > >>------------------------------------------------------- > > >>This SF.net email is sponsored by: SF.net Giveback Program. Does > > >>SourceForge.net help you be more productive? Does it > > >>help you create better code? SHARE THE LOVE, and help us help > > >>YOU! Click Here: http://sourceforge.net/donate/ > > >>_______________________________________________ > > >>Opensymphony-webwork mailing list > > >>[EMAIL PROTECTED] > > >>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > >> > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > > SourceForge.net help you be more productive? Does it > > > help you create better code? SHARE THE LOVE, and help us help > > > YOU! Click Here: http://sourceforge.net/donate/ > > > _______________________________________________ > > > Opensymphony-webwork mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > > SourceForge.net help you be more productive? Does it > > > help you create better code? SHARE THE LOVE, and help us help > > > YOU! Click Here: http://sourceforge.net/donate/ > > > _______________________________________________ > > > Opensymphony-webwork mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > > SourceForge.net help you be more productive? Does it > > > help you create better code? SHARE THE LOVE, and help us help > > > YOU! Click Here: http://sourceforge.net/donate/ > > > _______________________________________________ > > > Opensymphony-webwork mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > ------------------------------------------------------------------- > Joseph B. Ottinger http://enigmastation.com > IT Consultant [EMAIL PROTECTED] > J2EE Editor - Java Developer's Journal [EMAIL PROTECTED] > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork