Top Description Fields Constructors Methods
org.apache.catalina.valves

public Class ProxyErrorReportValve

extends ErrorReportValve
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, java.net.HttpURLConnection, .URI, .URISyntaxException, .URL, .URLEncoder, java.nio.charset.StandardCharsets, java.util.MissingResourceException, .ResourceBundle, java.util.concurrent.atomic.AtomicBoolean, org.apache.catalina.connector.Request, .Response, org.apache.catalina.util.IOTools, org.apache.coyote.ActionCode, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.util.ExceptionUtils, org.apache.tomcat.util.descriptor.web.ErrorPage, org.apache.tomcat.util.res.StringManager

Implementation of a Valve that proxies or redirects error reporting to other urls.

This Valve should be attached at the Host level, although it will work if attached to a Context.

Field Summary

Modifier and TypeField and Description
private static final Log
protected boolean
usePropertiesFile

Use a properties file for the URLs.

protected boolean
useRedirect

Use a redirect or proxy the response to the specified location.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
public boolean

Returns:

the usePropertiesFile
getUsePropertiesFile
()

public boolean

Returns:

the useRedirect
getUseRedirect
()

protected void
report(Request
The request being processed
request
,
Response
The response being generated
response
,
Throwable
The exception that occurred (which possibly wraps a root cause exception
throwable
)

Overrides org.apache.catalina.valves.ErrorReportValve.report.

Prints out an error report.

public void
setUsePropertiesFile(boolean
the usePropertiesFile to set
usePropertiesFile
)

public void
setUseRedirect(boolean
the useRedirect to set
useRedirect
)

Inherited from org.apache.catalina.valves.ErrorReportValve:
findErrorPagegetPartialServletStackTracegetPropertyinvokeisShowReportisShowServerInfosetPropertysetShowReportsetShowServerInfo

Field Detail

logback to summary
private static final Log log

Hides org.apache.catalina.util.LifecycleMBeanBase.log.

usePropertiesFileback to summary
protected boolean usePropertiesFile

Use a properties file for the URLs.

useRedirectback to summary
protected boolean useRedirect

Use a redirect or proxy the response to the specified location. Default to redirect.

Constructor Detail

ProxyErrorReportValveback to summary
public ProxyErrorReportValve()

Method Detail

getRedirectUrlback to summary
private String getRedirectUrl(Response response)
getUsePropertiesFileback to summary
public boolean getUsePropertiesFile()
Returns:boolean

the usePropertiesFile

getUseRedirectback to summary
public boolean getUseRedirect()
Returns:boolean

the useRedirect

reportback to summary
protected void report(Request request, Response response, Throwable throwable)

Overrides org.apache.catalina.valves.ErrorReportValve.report.

Doc from org.apache.catalina.valves.ErrorReportValve.report.

Prints out an error report.

Parameters
request:Request

The request being processed

response:Response

The response being generated

throwable:Throwable

The exception that occurred (which possibly wraps a root cause exception

Annotations
@Override
setUsePropertiesFileback to summary
public void setUsePropertiesFile(boolean usePropertiesFile)
Parameters
usePropertiesFile:boolean

the usePropertiesFile to set

setUseRedirectback to summary
public void setUseRedirect(boolean useRedirect)
Parameters
useRedirect:boolean

the useRedirect to set