I have a problem in putting custom error page for our application,
I did the following steps in tomcat-4.1.24
1.created one errorPage.jsp placed it in the webapps\context-root\errors 2. I have added the following tag in the web.xml <error-page> <exception-type>java.lang.Exception</exception-type> <location>/errors/errorPage.jsp</location> </error-page>
3. a)if I access a page which already has a error it is giving pagenot found exception default page.
b) if the proper page is accessed successfully and after that an exception comes then my custom page erorPage.jsp is opening.
Please can you tell me any way how to redirect the page without adding <%@ page errorPage="errorPage.jsp" %> this tag because mine is a very big project i can't add this thousands of files.