struts的异常处理

直接在struts.xml里面配置:

 1     <constant name="struts.devMode" value="true"></constant>
 2     <package name="bbs2009_default" extends="struts-default">
 3      
 4         <global-results>
 5             <result name="error">/error.jsp</result>
 6         </global-results>
 7         
 8          <global-exception-mappings>
 9             <exception-mapping result="error" exception="java.lang.Exception"></exception-mapping>
10         </global-exception-mappings>
11          
12         
13         
14     </package>

 

posted @ 2013-03-15 00:52  hi_stefen  Views(111)  Comments(0)    收藏  举报