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

pack-priv final Class StandardHostValve

extends ValveBase
Class Inheritance
Imports
java.io.IOException, java.util.concurrent.atomic.AtomicBoolean, jakarta.servlet.DispatcherType, .RequestDispatcher, .ServletContext, .ServletException, jakarta.servlet.http.HttpServletResponse, org.apache.catalina.Context, .Globals, .Wrapper, org.apache.catalina.connector.ClientAbortException, .Request, .Response, org.apache.catalina.valves.ValveBase, 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

Valve that implements the default basic behavior for the StandardHost container implementation.

USAGE CONSTRAINT: This implementation is likely to be useful only when processing HTTP requests.

Authors
Craig R. McClanahan, Remy Maucherat

Field Summary

Modifier and TypeField and Description
private static final Log
private static final ClassLoader
private static final StringManager
Inherited from org.apache.catalina.valves.ValveBase:
asyncSupportedcontainercontainerLognext

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private boolean
custom(Request
The request being processed
request
,
Response
The response being generated
response
,
ErrorPage
The errorPage directive we are obeying
errorPage
)

Handle an HTTP status code or Java exception by forwarding control to the location included in the specified errorPage object.

public void
invoke(Request
Request to be processed
request
,
Response
Response to be produced
response
)

Implements org.apache.catalina.Valve.invoke.

Select the appropriate child Context to process this request, based on the specified request URI.

private void
status(Request
The request being processed
request
,
Response
The response being generated
response
)

Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response.

protected void
throwable(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
)

Handle the specified Throwable encountered while processing the specified Request to produce the specified Response.

Inherited from org.apache.catalina.valves.ValveBase:
backgroundProcessgetContainergetDomainInternalgetNextgetObjectNameKeyPropertiesinitInternalisAsyncSupportedsetAsyncSupportedsetContainersetNextstartInternalstopInternaltoString

Field Detail

logback to summary
private static final Log log

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

MY_CLASSLOADERback to summary
private static final ClassLoader MY_CLASSLOADER
smback to summary
private static final StringManager sm

Hides org.apache.catalina.valves.ValveBase.sm.

Constructor Detail

StandardHostValveback to summary
pack-priv StandardHostValve()

Method Detail

customback to summary
private boolean custom(Request request, Response response, ErrorPage errorPage)

Handle an HTTP status code or Java exception by forwarding control to the location included in the specified errorPage object. It is assumed that the caller has already recorded any request attributes that are to be forwarded to this page. Return true if we successfully utilized the specified error page location, or false if the default error report should be rendered.

Parameters
request:Request

The request being processed

response:Response

The response being generated

errorPage:ErrorPage

The errorPage directive we are obeying

invokeback to summary
public void invoke(Request request, Response response) throws IOException, ServletException

Implements org.apache.catalina.Valve.invoke.

Select the appropriate child Context to process this request, based on the specified request URI. If no matching Context can be found, return an appropriate HTTP error.

Parameters
request:Request

Request to be processed

response:Response

Response to be produced

Annotations
@Override
Exceptions
IOException:
if an input/output error occurred
ServletException:
if a servlet error occurred
statusback to summary
private void status(Request request, Response response)

Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response. Any exceptions that occur during generation of the error report are logged and swallowed.

Parameters
request:Request

The request being processed

response:Response

The response being generated

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

Handle the specified Throwable encountered while processing the specified Request to produce the specified Response. Any exceptions that occur during generation of the exception report are logged and swallowed.

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
@SuppressWarnings:deprecation