Lack of few things may make an application less polished and professional than a server's default exception page. Even though most of the well-designed pages generally shows the stack trace as well as the exception name and makes your application look broken. Our application may have a bug, but that's no reason for it to look bad, as well.
The J2EE platform offers a great deal of control over formatting information regarding errors when a web component throws an unexpected exception. Almost all the web component properly catches and handles all application and system exceptions that can occur. But in the real world, accidents usually happens. The JSP error page allows us to catch, present, and report exceptions gracefully, instead of presenting the user with a technical, and possibly confusing, stack trace.
Sometimes we require entire control of a page's exception handling mechanism. To provides the complete control over the error handling mechanism page directive provides an attribute known as errorPage that takes a URL to a web component that handles the exception reporting for an individual page. If a an exception occurs in a JSP page then all the exceptions are sent to that page, even if web.xml specifically defines an error page for that page.
To know more about JSP error pages click on the
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: October 7, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles