Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 31504 invoked from network); 18 May 2003 12:27:43 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 May 2003 12:27:43 -0000 Received: (qmail 5733 invoked by uid 97); 18 May 2003 12:29:50 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 5726 invoked from network); 18 May 2003 12:29:49 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 18 May 2003 12:29:49 -0000 Received: (qmail 30636 invoked by uid 500); 18 May 2003 12:27:36 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 30625 invoked from network); 18 May 2003 12:27:35 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 18 May 2003 12:27:35 -0000 Received: (qmail 5711 invoked by uid 50); 18 May 2003 12:29:42 -0000 Date: 18 May 2003 12:29:42 -0000 Message-ID: <20030518122942.5710.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 20018] New: - ErrorPage directive doesn't work for http error codes (400,500,..) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20018 ErrorPage directive doesn't work for http error codes (400,500,..) Summary: ErrorPage directive doesn't work for http error codes (400,500,..) Product: Tomcat 5 Version: 5.0.2 Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: tfohrer@t-online.de Problem: Adding error-page directive to web.xml have no affect to tomcat error reporting. TestCase: 1. getting working copy of jakarta-tomcat-5.0.2 3. go to webapps/ROOT/WEB-INF 4. add following to web.xml 404 /404.html 5. create a file webapps/ROOT/404.html with some content 6. start tomcat 7. access http://localhost:8080/NotExistingFile.html 8. getting error report from ErrorReportValve, and not /404.html Breakdown: 1. Getting tomcat to print debug stuff ( especially DefaultServlet/Jasper ) 2. Seeing in source code, that ErrorDispatcherValve calls RequestDispatcher.forward with location of error-page 4. But see, that jasper/defaultservlet trying to getting origin location,not the location of error-page 5. Looking in ApplicationDispatcher, see that uri is changed without affect for error-pages, because processRequest using unaltered request for errors Possibly broken, but working small ( WORKSFORME!) fix: Index: ApplicationDispatcher.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v retrieving revision 1.16 diff -u -r1.16 ApplicationDispatcher.java --- ApplicationDispatcher.java 17 Apr 2003 15:31:45 -0000 1.16 +++ ApplicationDispatcher.java 18 May 2003 12:04:59 -0000 @@ -449,7 +449,7 @@ wrequest.setQueryParams(queryString); } - processRequest(request,response); + processRequest(wrequest,response); unwrapRequest(); } --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org