myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Myfaces Wiki] Update of "Handling Server Errors" by MartinMarinschek
Date Thu, 02 Aug 2007 08:12:28 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MartinMarinschek:

  == Handling Server Errors ==
+ MyFaces, from version 1.2.1 and 1.1.7, includes automatic error-handling for the full JSF-Lifecycle
(taken over mostly from Facelets, with a few adoptions and additions). So for most projects
during development, you will have exactly what you want with these new error-handling possibilities.

+ If this is not what you want, though, you can always disable or modify this error-handling
with the following parameters:
+ {{{
+   <!-- if you want to disable the behaviour completely -->
+   <context-param>
+     <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+     <param-value>false</param-value>
+   </context-param>
+   <!-- if you want to choose a different class for handling the exception - the error-handler
needs to include a method handleException(FacesContext fc, Exception ex)-->
+   <!--context-param>
+     <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
+     <param-value>my.project.ErrorHandler</param-value>
+   </context-param--> 
+ }}}
+ If you do this, you can now read on to get to general ways of handling server-errors.
  Server errors such as HTTP 500 can occur for a number of reasons such as uncaught exceptions,
missing JSFs or backing beans, bad URL and the list goes on. While we hope these only occur
during development it is important to plan to catch and deal with these errors gracefully
when running live with multiple users.

View raw message