When a web application throws an exception and you want it to navigate to user-friendly web page, it can be done by creating a JSP which will show the exception message in much better way.
For this, first make an entry in web.xml for the exception as shown below
In this case, when the application throws and exception whose error code is 404, application will navigate to error.jsp
Error.jsp :
For this, first make an entry in web.xml for the exception as shown below
In this case, when the application throws and exception whose error code is 404, application will navigate to error.jsp
Error.jsp :
No comments:
Post a Comment