Message: A new issue has been created in JIRA.
--------------------------------------------------------------------- View the issue: http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-218 Here is an overview of the issue: --------------------------------------------------------------------- Key: WW-218 Summary: Make ServletDispatcher return a HTTP 500 Internal Server Error instead of printing the stack trace Type: Improvement Status: Assigned Priority: Major Project: WebWork Components: Dispatch Versions: 2.0 Assignee: Patrick Lightbody Reporter: Cameron Braid Created: Fri, 13 Jun 2003 5:35 AM Updated: Fri, 13 Jun 2003 5:35 AM Description: I suggest that the ServletDispatcher is modified using the attached patch to change the default exception handeling to be more inline with the servlet spec. I would like to be able to provide my own error page, and currently there is no easy way to do this. (if any way at all?) I suggest that the servlet dispatched : a) places the exception in the request to make it availible to the error page b) sends a http 500 error Once this patch has been accepted the user can do the following: a) add an exception handler JSP (or any other servlet) in webl.xml <error-page> <error-code>500</error-code> <location>/WEB-INF/views/error/error.jsp</location> </error-page> b) create the error handler /WEB-INF/views/error/error.jsp <%@ page isErrorPage="true" %> <%@ page import="java.io.*" %> <h4 onclick="error.style.display='block';">Error</h4> <p> there was an unexpected error processing your request </p> <div id='error' style="display:none"> <pre> <% if (exception != null) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); exception.printStackTrace(pw); out.print(sw); sw.close(); pw.close(); } %> </pre> </div> --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://jira.opensymphony.com/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
