Analysis of exception handling mechanism in struts 2

Because an exception is thrown when the execute method of action is declared, we don't need to catch the exception in the execute method, just in struts Configure exception handling in XML.

In order to use the exception handling mechanism of struts 2, the exception mapping function of struts 2 must be turned on, which requires the exception interceptor. In struts - default The exception interceptor has been opened in the XML file.

I hope it will help you. Interested friends can refer to: struts 2 development process and detailed configuration, detailed explanation of struts 2 dynamic method call, etc. Please leave a message if you have any questions, and Xiaobian will reply to you in time.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>