struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r191322 - /struts/core/trunk/doc/userGuide/building_controller.xml
Date Sun, 19 Jun 2005 06:50:50 GMT
Author: mrdon
Date: Sat Jun 18 23:50:48 2005
New Revision: 191322

URL: http://svn.apache.org/viewcvs?rev=191322&view=rev
Log:
Adding a listing and description of all possible attributes for the
exception element.  Also included a description of what happens when no
'handler' attribute is specified.

PR: 14068

Modified:
    struts/core/trunk/doc/userGuide/building_controller.xml

Modified: struts/core/trunk/doc/userGuide/building_controller.xml
URL: http://svn.apache.org/viewcvs/struts/core/trunk/doc/userGuide/building_controller.xml?rev=191322&r1=191321&r2=191322&view=diff
==============================================================================
--- struts/core/trunk/doc/userGuide/building_controller.xml (original)
+++ struts/core/trunk/doc/userGuide/building_controller.xml Sat Jun 18 23:50:48 2005
@@ -972,6 +972,122 @@
     The <code>key</code> is a key into your message resources properties file

     that can be used to retrieve an error message.
     </p>
+    <p>
+    If the <code>handler</code> attribute is not specified, the default handler
+    stores the exception in the request attribute under the value of the 
+    <code>Globals.EXCEPTION_KEY</code> global key.
+    </p>
+
+    <p>
+    The possible attributes for the "exception" element are as follows:
+    </p>
+    <table>
+    <tr>
+        <th>Attribute</th>
+        <th>Description</th>
+        <th>Default</th>
+    </tr>    
+    <tr>
+        <td>
+        <code>bundle</code>
+        </td>
+        <td>
+            Servlet context attribute for the message resources bundle
+            associated with this handler. The default attribute is the
+            value specified by the string constant declared at
+            <code>Globals.MESSAGES_KEY</code>.
+        </td>
+        <td>
+            <code>org.apache.struts.Globals.MESSAGES_KEY</code>
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>className</code>
+        </td>
+        <td>
+            The configuration bean for this ExceptionHandler object.
+            If specified, className must be a subclass of the default
+            configuration bean
+        </td>
+        <td>
+            "<code>org.apache.struts.config.ExceptionConfig</code>"
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>extends</code>
+        </td>
+        <td>
+            The name of the exception handler that this 
+            will inherit configuration information from.
+        </td>
+        <td>
+            None
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>handler</code>
+        </td>
+        <td>
+            Fully qualified Java class name for this exception handler.
+        </td>
+        <td>
+            "<code>org.apache.struts.action.ExceptionHandler</code>"
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>key</code>
+        </td>
+        <td>
+            The key to use with this handler's message resource bundle
+            that will retrieve the error message template for this
+            exception.
+        </td>
+        <td>
+            None
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>path</code>
+        </td>
+        <td>
+            The module-relative URI to the resource that will complete
+            the request/response if this exception occurs.
+        </td>
+        <td>
+            None
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>scope</code>
+        </td>
+        <td>
+            The context ("request" or "session") that is used to access
+            the ActionError object [org.apache.struts.action.ActionError]
+            for this exception.
+        </td>
+        <td>
+            "<code>request</code>"
+        </td>
+    </tr>
+    <tr>
+        <td>
+        <code>type</code>
+        </td>
+        <td>
+            Fully qualified Java class name of the exception type to
+            register with this handler.
+        </td>
+        <td>
+            None
+        </td>
+    </tr>
+    </table>
     
     <p>
     You can override global exception handlers by defining a handler inside an 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message