Bug 57741 - Add support for error-pages to CGIServlet
Add support for error-pages to CGIServlet
Status: RESOLVED FIXED
Product: Tomcat 8
Classification: Unclassified
Component: Catalina
8.0.x-trunk
PC All
: P2 enhancement (vote)
: ----
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2015-03-23 12:06 UTC by jdh5259
Modified: 2015-07-09 00:25 UTC (History)
0 users



Attachments
Patch for applying the enchancement described in the report. Adds a new init-param to the servlet configuration which will be used to trigger the error-page mechanism. (3.85 KB, patch)
2015-03-23 12:06 UTC, jdh5259
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jdh5259 2015-03-23 12:06:16 UTC
Created attachment 32591 [details]
Patch for applying the enchancement described in the report. Adds a new init-param to the servlet configuration which will be used to trigger the error-page mechanism.

A configuration parameter has been added to the CGIServlet to allow use of the error-page mechanism. Default configuration will maintain current functionality.

Currently, when the debug logging level is too low and there is an error executing the CGI script, a blank page is returned even if the corresponding error-page is configured correctly. This causes inconsistency with custom error-pages.
Comment 1 jdh5259 2015-06-29 21:52:07 UTC
Is there anything additional that I need to do in order to have this patch either accepted or declined? I am curious because I have not seen any activity on this in the last three months.

Thanks.
Comment 2 Mark Thomas 2015-06-29 22:19:25 UTC
See http://markmail.org/message/l7d242gtzamednke

In short, this is waiting for a committer to take the time to think this request through and make sure that it makes sense.
Comment 3 Phil Dicke 2015-07-06 15:32:26 UTC
I'm seeing the same issue and it would be good to get this merged instead of having to build and deploy custom Tomcats
Comment 4 Mark Thomas 2015-07-06 20:39:40 UTC
I've had a look at this request.

I'm currently leaning towards using the debug level to determine whether to use setStatus() or sendError() rather than a new configuration setting. I'll document that setting debug >= 10 will disable custom error pages and show debug pages instead. Probably with a further comment not to use this setting in production. Looking at the docs, some further explanation of what the signfificant values for debug are (once I've worked them out) wouldn't go amiss either.
Comment 5 Mark Thomas 2015-07-08 17:11:30 UTC
As of 8.0.25, the CGI servlet will use the standard error page mechanism unless the debug attribute is 10 or less.
Comment 6 jdh5259 2015-07-09 00:25:28 UTC
(In reply to Mark Thomas from comment #5)
> As of 8.0.25, the CGI servlet will use the standard error page mechanism
> unless the debug attribute is 10 or less.

Thanks Mark! Appreciate the help.