dgraham 2002/10/26 19:27:48 Modified: doc/userGuide building_controller.xml Log: fixed exception handler docs Revision Changes Path 1.38 +6 -5 jakarta-struts/doc/userGuide/building_controller.xml Index: building_controller.xml =================================================================== RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_controller.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- building_controller.xml 20 Oct 2002 20:01:06 -0000 1.37 +++ building_controller.xml 27 Oct 2002 02:27:47 -0000 1.38 @@ -417,15 +417,16 @@ Your execute method should process the Exception and return an ActionForward object to tell Struts where to forward to next. Then you configure your handler in struts-config.xml like this:<br/> - <pre> - <global-exceptions> - <exception key="some.key" type="java.io.IOException" handler="com.yourcorp.ExceptionHandler"/> - </global-exceptions> - </pre> + <global-exceptions> + <exception key="some.key" type="java.io.IOException" handler="com.yourcorp.ExceptionHandler"/> + </global-exceptions> <br/> That configuration says that com.yourcorp.ExceptionHandler.execute() will be called when any IOException is thrown by an Action. The key is a key from your message resources properties file that can be used to display an error message. + </p> + <p> + You can override global exception handlers by defining a handler inside an action definition. </p> <p> A common use of ExceptionHandler's is to configure one for java.lang.Exception so it's called
-- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>