ContactUs

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What's declarative exception handling in Struts?

When logic for exception handling is defined in struts-config.xml or within the action tag, it’s known as declarative exception handling in Struts.

In the following example, we have defined exception in struts-config.xml file for NullPointerException:

[xml]

<global-exceptions>

<exception key=”test.key”

Type=”java.lang.NullPointerException”

Path=”/WEB-INF/errors/error_page.jsp”

</global-exceptions>

[/xml]

Related Posts Plugin for WordPress, Blogger...
Flag Counter