`
jknmae
  • 浏览: 10847 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

sturts2异常

阅读更多
对于struts2的Action的所抛的异常在inteceptor 中得到拦截可在struts.xml中配制全局变量

   <package name="bjsxt_2012" extends="struts-default" >
    	<global-results>
    		<result name="error">/error.jsp</result>
    	</global-results>
    	<global-exception-mappings>
    		<exception-mapping result="error" exception="java.lang.Exception"></exception-mapping>
    	</global-exception-mappings>
    </package>

这里要注意result 必需写在exception-mappings前
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics