We can Handle the errors by holding them into ActionError or ActionErrors classes defined by struts Framework. The other way around is by using the methods say saveErrors()....etc defined in Action class and can throw the error messages.
Struts handles errors by providing the ActionErrors class which is extended from org.apache.struts.action... To install your customized exception handler, the first step is to create a class that extends org.apache.struts.action.ExceptionHandler. There are two methods that you can override, execute() and storeException(). For handling exceptions you have to mention in <global-exceptions> tag of struts-config.xml which accepts attributes like exception type,key and path.
We can Handle the errors by holding them into ActionError or ActionErrors classes defined by struts Framework. The other way around is by using the methods say saveErrors()....etc defined in Action class and can throw the error messages.
Struts handles errors by providing the ActionErrors class which is extended from org.apache.struts.action... To install your customized exception handler, the first step is to create a class that extends org.apache.struts.action.ExceptionHandler. There are two methods that you can override, execute() and storeException(). For handling exceptions you have to mention in <global-exceptions> tag of struts-config.xml which accepts attributes like exception type,key and path.