Thursday, August 10, 2017

How to declare exceptions in struts?

Exceptions and Errors are declared in web.xml file of our struts application


<error-page>
      <exception-type>java.lang.Exception</exception-type>
      <location>/appException.html</location>
</error-page>

 
<error-page>
     <error-code>404</error-code>
     <location>/ErrorPage.html</location>
</error-page>

No comments: