https://bz.apache.org/bugzilla/show_bug.cgi?id=59966
Bug ID: 59966 Summary: Wrong configured error-page elements in deployment descriptor will become the fallback error-page Product: Tomcat 8 Version: 8.5.x-trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: saschakarc...@gmx.de Example scenario: web.xml contains the following block: ... <error-page> <error-code>java.lang.Throwable</error-code> <location>/unexpected.jsp</location> </error-page> ... This block wrongly contains "error-type" instead of "error-code". When this application is deployed the error-page is registered as the default error page because org.apache.tomcat.util.descriptor.web.ErrorPage#setErrorCode catches NumberFormatException and assumes errorCode 0. Then later when a request to a servlet is made which uses the sendError (e.g. with 404) method the page "unexpected.jsp" is displayed instead of the default 404 page. It's also related to org.apache.catalina.core.StandardHostValve#status(Request request, Response response) where it says: ... ErrorPage errorPage = context.findErrorPage(statusCode); if (errorPage == null) { // Look for a default error page errorPage = context.findErrorPage(0); } ... "context.findErrorPage(0)" returns "/unexpected.jsp" although it should return null. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org