Configure Error Page In Web.xml
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to specify the default error page in web.xml? up vote 85 down vote favorite 37 I am using
Servlets - Life Cycle Servlets - Examples Servlets - Form Data Servlets - Client Request Servlets - Server Response Servlets - Http Codes Servlets - Writing Filters Servlets - Exceptions Servlets - Cookies Handling Servlets - Session Tracking Servlets - Database Access Servlets - File Uploading Servlets - Handling Date Servlets - Page Redirect Servlets - Hits Counter Servlets - Auto Refresh Servlets - Sending Email Servlets - Packaging Servlets - Debugging http://stackoverflow.com/questions/7066192/how-to-specify-the-default-error-page-in-web-xml Servlets - Internationalization Servlet Useful Resources Servlets - Questions and Answers Servlets - Quick Guide Servlets - Useful Resources Servlets - Discussion Selected Reading Developer's Best Practices Questions and Answers Effective Resume Writing HR Interview Questions Computer Glossary Who is Who Servlets - Exception Handling Advertisements Previous Page Next Page When http://www.tutorialspoint.com/servlets/servlets-exception-handling.htm a servlet throws an exception, the web container searches the configurations in web.xml that use the exception-type element for a match with the thrown exception type. You would have to use the error-page element in web.xml to specify the invocation of servlets in response to certain exceptions or HTTP status codes. web.xml Configuration: Consider, you have an ErrorHandler servlet which would be called whenever there is any defined exception or error. Following would be the entry created in web.xml.
SOAEJB3SpringPDFEmailJ2MEJ2EE ApplicationXMLDesign PatternLogSecurityApache CommonAntJUnitSet http://www.java2s.com/Tutorial/Java/0400__Servlet/Seterrorpageinwebxml.htm error page in web.xml : web.xml«Servlet«Java TutorialJava http://www.theserverside.com/news/thread.tss?thread_id=29287 TutorialServletweb.xml
Java testing Databases Java development in cloud Java DevOps Modular code EJB specification Modular containers Modular troubleshooting Programming code App servers Modular tools Java in the cloud Java Web services WS* specs Architecture Java middleware Spring Hibernate Servlets JSP Java client platforms Framework JSF Web portals UI Enterprise Java development JSRs and APIs Languages JVM languages DSLs Java app deployment Java tools Java performance Java performance Cloud platforms JVM tuning Java HPC Web dev tools Development tools Open source strategy IDEs Java platforms Java testing Development hardware Mobile app dev Mobile development and deployment Mobile cloud apps Mobile platforms Mobile ALM Mobile app testing SEARCH this site and the web Site Index Home>Web tier: servlets, JSP, Web frameworks>Best way to handle 404 - page not found error in a jsp. Email This Home Web tier: servlets, JSP, Web frameworks: Best way to handle 404 - page not found error in a jsp. Get thread feed Best way to handle 404 - page not found error in a jsp. (15 messages) Posted by: Amit Sharma Posted on: October 07 2004 08:13 EDT hiThe problem that i am facing is I have a simple test application if a page is not found than it show 404 error but instead of this page i want to show my own custom error page. Reply to this Threaded Messages (15) Use a