public class ErrorReportValve extends ValveBase
Implementation of a Valve that outputs HTML error pages.
This Valve should be attached at the Host level, although it will work if attached to a Context.
HTML code from the Cocoon 2 project.
Constructor and Description |
---|
ErrorReportValve() |
Modifier and Type | Method and Description |
---|---|
String |
getInfo()
Return descriptive information about this Valve implementation.
|
protected String |
getPartialServletStackTrace(Throwable t)
Print out a partial servlet stack trace (truncating at the last
occurrence of javax.servlet.).
|
void |
invoke(Request request,
Response response)
Invoke the next Valve in the sequence.
|
protected void |
report(Request request,
Response response,
Throwable throwable)
Prints out an error report.
|
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName, toString
public String getInfo()
public void invoke(Request request, Response response) throws IOException, javax.servlet.ServletException
invoke
in interface Valve
invoke
in class ValveBase
request
- The servlet request to be processedresponse
- The servlet response to be createdIOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet error occursprotected void report(Request request, Response response, Throwable throwable)
request
- The request being processedresponse
- The response being generatedthrowable
- The exception that occurred (which possibly wraps
a root cause exceptionCopyright © 2013 JBoss by Red Hat. All rights reserved.