Merge pull request #4734 from eclipse/jetty-9.4.x-4529-servlet-in-errorpage
Issue #4529 - Fixing HTML error page from showing servlet info if configured not to do so
This commit is contained in:
commit
b070c08ad7
|
@ -416,7 +416,10 @@ public class ErrorHandler extends AbstractHandler
|
|||
htmlRow(writer, "URI", uri);
|
||||
htmlRow(writer, "STATUS", status);
|
||||
htmlRow(writer, "MESSAGE", message);
|
||||
if (isShowServlet())
|
||||
{
|
||||
htmlRow(writer, "SERVLET", request.getAttribute(Dispatcher.ERROR_SERVLET_NAME));
|
||||
}
|
||||
Throwable cause = (Throwable)request.getAttribute(Dispatcher.ERROR_EXCEPTION);
|
||||
while (cause != null)
|
||||
{
|
||||
|
@ -457,7 +460,7 @@ public class ErrorHandler extends AbstractHandler
|
|||
while (cause != null)
|
||||
{
|
||||
writer.printf("CAUSED BY %s%n", cause);
|
||||
if (_showStacks && !_disableStacks)
|
||||
if (isShowStacks() && !_disableStacks)
|
||||
{
|
||||
cause.printStackTrace(writer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue