Monday, January 26, 2009

Using Try/Catch Block

Tips for using Try/Catch Block in Struts:

1. Do not use Try/Catch block within the action class as far as possible.
2. If you use Try/Catch block, use it with custom defined exception.
3. Use proper Error-Message to handle the error.
4. Do not let the 'Page Not Found' error in your application.
5. Have a standard error page for your errors to have a standard error interface.