Hi, Say a user has a custom error page for status codes of 500 when an uncaught exception occurs. The request parameter, javax.servlet.error.status_code, is not set, so if the error page tries to access this req. parameter, null will be returned.
Attached is a patch that I've tested in my env and seems to do the trick. -rl
Index: ErrorDispatcherValve.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorDispatcherValve.java,v retrieving revision 1.6 diff -u -r1.6 ErrorDispatcherValve.java --- ErrorDispatcherValve.java 2001/11/13 00:42:24 1.6 +++ ErrorDispatcherValve.java 2001/11/16 23:56:55 @@ -229,6 +229,8 @@ response.setAppCommitted(false); ServletRequest sreq = request.getRequest(); ServletResponse sresp = response.getResponse(); + sreq.setAttribute(Globals.STATUS_CODE_ATTR, + new +Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR)); sreq.setAttribute(Globals.ERROR_MESSAGE_ATTR, throwable.getMessage()); sreq.setAttribute(Globals.EXCEPTION_ATTR,
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>