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

pack-priv Class ApplicationHttpRequest

extends HttpServletRequestWrapper
Class Inheritance
Imports
java.io.IOException, .UnsupportedEncodingException, java.nio.charset.Charset, .StandardCharsets, java.util.ArrayList, .Arrays, .Collections, .Enumeration, .HashMap, .List, .Map, .NoSuchElementException, jakarta.servlet.DispatcherType, .RequestDispatcher, .ServletContext, .ServletRequest, .ServletRequestWrapper, jakarta.servlet.http.HttpServletMapping, .HttpServletRequest, .HttpServletRequestWrapper, .HttpSession, .PushBuilder, org.apache.catalina.Context, .Globals, .Manager, .Session, org.apache.catalina.connector.RequestFacade, org.apache.catalina.util.ParameterMap, .RequestUtil, .URLEncoder, org.apache.tomcat.util.ExceptionUtils, org.apache.tomcat.util.buf.B2CConverter, .MessageBytes, org.apache.tomcat.util.http.Parameters, org.apache.tomcat.util.res.StringManager

Wrapper around a jakarta.servlet.http.HttpServletRequest that transforms an application request object (which might be the original one passed to a servlet, or might be based on the 2.3 jakarta.servlet.http.HttpServletRequestWrapper class) back into an internal org.apache.catalina.HttpRequest.

Warning

Due to Java's lack of support for multiple inheritance, all of the logic in ApplicationRequest is duplicated in ApplicationHttpRequest. Make sure that you keep these two classes in synchronization when making changes!

Authors
Craig R. McClanahan, Remy Maucherat

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
ApplicationHttpRequest.AttributeNamesEnumerator

Utility class used to expose the special attributes as being available as request attributes.

Field Summary

Modifier and TypeField and Description
protected final Context
context

The context for this request.

protected String
contextPath

The context path for this request.

protected final boolean
crossContext

If this request is cross context, since this changes session access behavior.

protected DispatcherType
dispatcherType

The current dispatcher type.

private HttpServletMapping
mapping

The mapping for this request.

protected Map<String, String[]>
parameters

The request parameters for this request.

private boolean
parsedParams

Have the parameters for this request already been parsed?

protected String
pathInfo

The path information for this request.

private String
queryParamString

The query parameters for the current request.

protected String
queryString

The query string for this request.

protected Object
requestDispatcherPath

The current request dispatcher path.

protected String
requestURI

The request URI for this request.

protected String
servletPath

The servlet path for this request.

protected Session
session

The currently active session for this request.

private static final int
private static final StringManager
protected final Object[]
specialAttributes

Special attributes.

protected static final String[]
specials

The set of attribute names that are special for request dispatchers.

private static final int
private static final Map<String, Integer>

Constructor Summary

AccessConstructor and Description
pack-priv
ApplicationHttpRequest(HttpServletRequest
The servlet request being wrapped
request
,
Context
The target context for the wrapped request
context
,
boolean
true if the wrapped request will be a cross-context request, otherwise false
crossContext
)

Construct a new wrapped request around the specified servlet request.

Method Summary

Modifier and TypeMethod and Description
public Object
getAttribute(String
Name of the attribute to retrieve
name
)

Overrides jakarta.servlet.ServletRequestWrapper.getAttribute.

Implements jakarta.servlet.ServletRequest.getAttribute.

Override the getAttribute() method of the wrapped request.

public Enumeration<String>
getAttributeNames()

Overrides jakarta.servlet.ServletRequestWrapper.getAttributeNames.

Implements jakarta.servlet.ServletRequest.getAttributeNames.

Override the getAttributeNames() method of the wrapped request.

public String
getContextPath()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getContextPath.

Implements jakarta.servlet.http.HttpServletRequest.getContextPath.

Override the getContextPath() method of the wrapped request.

public DispatcherType
getDispatcherType()

Overrides jakarta.servlet.ServletRequestWrapper.getDispatcherType.

Implements jakarta.servlet.ServletRequest.getDispatcherType.

Override the getDispatcherType() method of the wrapped request.

public HttpServletMapping
public String
getParameter(String
Name of the requested parameter
name
)

Overrides jakarta.servlet.ServletRequestWrapper.getParameter.

Implements jakarta.servlet.ServletRequest.getParameter.

Override the getParameter() method of the wrapped request.

public Map<String, String[]>
getParameterMap()

Overrides jakarta.servlet.ServletRequestWrapper.getParameterMap.

Implements jakarta.servlet.ServletRequest.getParameterMap.

Override the getParameterMap() method of the wrapped request.

public Enumeration<String>
getParameterNames()

Overrides jakarta.servlet.ServletRequestWrapper.getParameterNames.

Implements jakarta.servlet.ServletRequest.getParameterNames.

Override the getParameterNames() method of the wrapped request.

public String[]
getParameterValues(String
Name of the requested parameter
name
)

Overrides jakarta.servlet.ServletRequestWrapper.getParameterValues.

Implements jakarta.servlet.ServletRequest.getParameterValues.

Override the getParameterValues() method of the wrapped request.

public String
getPathInfo()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getPathInfo.

Implements jakarta.servlet.http.HttpServletRequest.getPathInfo.

Override the getPathInfo() method of the wrapped request.

public String
public String
getQueryString()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getQueryString.

Implements jakarta.servlet.http.HttpServletRequest.getQueryString.

Override the getQueryString() method of the wrapped request.

public RequestDispatcher
getRequestDispatcher(String
Path of the resource to be wrapped
path
)

Overrides jakarta.servlet.ServletRequestWrapper.getRequestDispatcher.

Implements jakarta.servlet.ServletRequest.getRequestDispatcher.

Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.

public String
getRequestURI()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getRequestURI.

Implements jakarta.servlet.http.HttpServletRequest.getRequestURI.

Override the getRequestURI() method of the wrapped request.

public StringBuffer
getRequestURL()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getRequestURL.

Implements jakarta.servlet.http.HttpServletRequest.getRequestURL.

Override the getRequestURL() method of the wrapped request.

public ServletContext
getServletContext()

Overrides jakarta.servlet.ServletRequestWrapper.getServletContext.

Implements jakarta.servlet.ServletRequest.getServletContext.

The default behavior of this method is to return getServletContext() on the wrapped request object.

public String
getServletPath()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getServletPath.

Implements jakarta.servlet.http.HttpServletRequest.getServletPath.

Override the getServletPath() method of the wrapped request.

public HttpSession
getSession()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getSession.

Implements jakarta.servlet.http.HttpServletRequest.getSession.

Return the session associated with this Request, creating one if necessary.

public HttpSession
getSession(boolean
Create a new session if one does not exist
create
)

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getSession.

Implements jakarta.servlet.http.HttpServletRequest.getSession.

Return the session associated with this Request, creating one if necessary and requested.

protected int

Returns:

the special attribute pos, or -1 if it is not a special attribute
getSpecial
(String name)

Get a special attribute.

public boolean

Returns:

true if the request specifies a JSESSIONID that is valid within the context of this ApplicationHttpRequest, false otherwise.
isRequestedSessionIdValid
()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.isRequestedSessionIdValid.

Implements jakarta.servlet.http.HttpServletRequest.isRequestedSessionIdValid.

Returns true if the request specifies a JSESSIONID that is valid within the context of this ApplicationHttpRequest, false otherwise.

protected boolean
isSpecial(String
Attribute name to be tested
name
)

Is this attribute name one of the special ones that is added only for included servlets?

private void
mergeParameters()

Merge the parameters from the saved query parameter string (if any), and the parameters already present on this request (if any), such that the parameter values from the query string show up first if there are duplicate parameter names.

private String[]
mergeValues(String[]
First set of values
values1
,
String[]
Second set of values
values2
)

Merge the two sets of parameter values into a single String array.

public PushBuilder
pack-priv void
parseParameters()

Parses the parameters of this request.

public void
recycle()

Recycle this request

public void
removeAttribute(String
Name of the attribute to remove
name
)

Overrides jakarta.servlet.ServletRequestWrapper.removeAttribute.

Implements jakarta.servlet.ServletRequest.removeAttribute.

Override the removeAttribute() method of the wrapped request.

protected boolean

Returns:

true if the attribute was a special attribute, false otherwise
removeSpecial
(String name)

Remove a special attribute.

public void
setAttribute(String
Name of the attribute to set
name
,
Object
Value of the attribute to set
value
)

Overrides jakarta.servlet.ServletRequestWrapper.setAttribute.

Implements jakarta.servlet.ServletRequest.setAttribute.

Override the setAttribute() method of the wrapped request.

pack-priv void
setContextPath(String
The new context path
contextPath
)

Set the context path for this request.

pack-priv void
pack-priv void
setPathInfo(String
The new path info
pathInfo
)

Set the path information for this request.

pack-priv void
setQueryParams(String
The query string containing parameters for this request
queryString
)

Save query parameters for this request.

pack-priv void
setQueryString(String
The new query string
queryString
)

Set the query string for this request.

pack-priv void
setRequest(HttpServletRequest
The new wrapped request
request
)

Set the request that we are wrapping.

pack-priv void
setRequestURI(String
The new request URI
requestURI
)

Set the request URI for this request.

pack-priv void
setServletPath(String
The new servlet path
servletPath
)

Set the servlet path for this request.

protected boolean

Returns:

true if the attribute was a special attribute, false otherwise
setSpecial
(String name, Object value)

Set a special attribute.

Inherited from jakarta.servlet.http.HttpServletRequestWrapper:
authenticatechangeSessionIdgetAuthTypegetCookiesgetDateHeadergetHeadergetHeaderNamesgetHeadersgetIntHeadergetMethodgetPartgetPartsgetRemoteUsergetRequestedSessionIdgetTrailerFieldsgetUserPrincipalisRequestedSessionIdFromCookieisRequestedSessionIdFromURLisTrailerFieldsReadyisUserInRoleloginlogoutupgrade

Field Detail

contextback to summary
protected final Context context

The context for this request.

contextPathback to summary
protected String contextPath

The context path for this request.

crossContextback to summary
protected final boolean crossContext

If this request is cross context, since this changes session access behavior.

dispatcherTypeback to summary
protected DispatcherType dispatcherType

The current dispatcher type.

mappingback to summary
private HttpServletMapping mapping

The mapping for this request.

parametersback to summary
protected Map<String, String[]> parameters

The request parameters for this request. This is initialized from the wrapped request.

parsedParamsback to summary
private boolean parsedParams

Have the parameters for this request already been parsed?

pathInfoback to summary
protected String pathInfo

The path information for this request.

queryParamStringback to summary
private String queryParamString

The query parameters for the current request.

queryStringback to summary
protected String queryString

The query string for this request.

requestDispatcherPathback to summary
protected Object requestDispatcherPath

The current request dispatcher path.

requestURIback to summary
protected String requestURI

The request URI for this request.

servletPathback to summary
protected String servletPath

The servlet path for this request.

sessionback to summary
protected Session session

The currently active session for this request.

shortestSpecialNameLengthback to summary
private static final int shortestSpecialNameLength
smback to summary
private static final StringManager sm
specialAttributesback to summary
protected final Object[] specialAttributes

Special attributes.

specialsback to summary
protected static final String[] specials

The set of attribute names that are special for request dispatchers.

SPECIALS_FIRST_FORWARD_INDEXback to summary
private static final int SPECIALS_FIRST_FORWARD_INDEX
specialsMapback to summary
private static final Map<String, Integer> specialsMap

Constructor Detail

ApplicationHttpRequestback to summary
pack-priv ApplicationHttpRequest(HttpServletRequest request, Context context, boolean crossContext)

Construct a new wrapped request around the specified servlet request.

Parameters
request:HttpServletRequest

The servlet request being wrapped

context:Context

The target context for the wrapped request

crossContext:boolean

true if the wrapped request will be a cross-context request, otherwise false

Method Detail

getAttributeback to summary
public Object getAttribute(String name)

Overrides jakarta.servlet.ServletRequestWrapper.getAttribute.

Implements jakarta.servlet.ServletRequest.getAttribute.

Override the getAttribute() method of the wrapped request.

Parameters
name:String

Name of the attribute to retrieve

Returns:Object

Doc from jakarta.servlet.ServletRequest.getAttribute.

an Object containing the value of the attribute, or null if the attribute does not exist

Annotations
@Override
getAttributeNamesback to summary
public Enumeration<String> getAttributeNames()

Overrides jakarta.servlet.ServletRequestWrapper.getAttributeNames.

Implements jakarta.servlet.ServletRequest.getAttributeNames.

Override the getAttributeNames() method of the wrapped request.

Returns:Enumeration<String>

Doc from jakarta.servlet.ServletRequest.getAttributeNames.

an Enumeration of strings containing the names of the request's attributes

Annotations
@Override
getContextPathback to summary
public String getContextPath()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getContextPath.

Implements jakarta.servlet.http.HttpServletRequest.getContextPath.

Override the getContextPath() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getContextPath.

a String specifying the portion of the request URI that indicates the context of the request

Annotations
@Override
getDispatcherTypeback to summary
public DispatcherType getDispatcherType()

Overrides jakarta.servlet.ServletRequestWrapper.getDispatcherType.

Implements jakarta.servlet.ServletRequest.getDispatcherType.

Override the getDispatcherType() method of the wrapped request.

Returns:DispatcherType

Doc from jakarta.servlet.ServletRequest.getDispatcherType.

TODO

Annotations
@Override
getHttpServletMappingback to summary
public HttpServletMapping getHttpServletMapping()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getHttpServletMapping.

Overrides default jakarta.servlet.http.HttpServletRequest.getHttpServletMapping.

Doc from jakarta.servlet.http.HttpServletRequestWrapper.getHttpServletMapping.

The default behavior of this method is to return HttpServletRequest#getHttpServletMapping() on the wrapped request object.

Returns:HttpServletMapping

Doc from jakarta.servlet.http.HttpServletRequest.getHttpServletMapping.

the mapping information for this request

Annotations
@Override
getParameterback to summary
public String getParameter(String name)

Overrides jakarta.servlet.ServletRequestWrapper.getParameter.

Implements jakarta.servlet.ServletRequest.getParameter.

Override the getParameter() method of the wrapped request.

Parameters
name:String

Name of the requested parameter

Returns:String

Doc from jakarta.servlet.ServletRequest.getParameter.

a String representing the single value of the parameter

Annotations
@Override
getParameterMapback to summary
public Map<String, String[]> getParameterMap()

Overrides jakarta.servlet.ServletRequestWrapper.getParameterMap.

Implements jakarta.servlet.ServletRequest.getParameterMap.

Override the getParameterMap() method of the wrapped request.

Returns:Map<String, String[]>

Doc from jakarta.servlet.ServletRequest.getParameterMap.

an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

Annotations
@Override
getParameterNamesback to summary
public Enumeration<String> getParameterNames()

Overrides jakarta.servlet.ServletRequestWrapper.getParameterNames.

Implements jakarta.servlet.ServletRequest.getParameterNames.

Override the getParameterNames() method of the wrapped request.

Returns:Enumeration<String>

Doc from jakarta.servlet.ServletRequest.getParameterNames.

an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters

Annotations
@Override
getParameterValuesback to summary
public String[] getParameterValues(String name)

Overrides jakarta.servlet.ServletRequestWrapper.getParameterValues.

Implements jakarta.servlet.ServletRequest.getParameterValues.

Override the getParameterValues() method of the wrapped request.

Parameters
name:String

Name of the requested parameter

Returns:String[]

Doc from jakarta.servlet.ServletRequest.getParameterValues.

an array of String objects containing the parameter's values

Annotations
@Override
getPathInfoback to summary
public String getPathInfo()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getPathInfo.

Implements jakarta.servlet.http.HttpServletRequest.getPathInfo.

Override the getPathInfo() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getPathInfo.

a String, canonicalized by the web container, specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information

Annotations
@Override
getPathTranslatedback to summary
public String getPathTranslated()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getPathTranslated.

Implements jakarta.servlet.http.HttpServletRequest.getPathTranslated.

Override the getPathTranslated() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getPathTranslated.

a String specifying the real path, or null if the URL does not have any extra path information

Annotations
@Override
getQueryStringback to summary
public String getQueryString()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getQueryString.

Implements jakarta.servlet.http.HttpServletRequest.getQueryString.

Override the getQueryString() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getQueryString.

a String containing the query string or null if the URL contains no query string. The value is not decoded by the container.

Annotations
@Override
getRequestDispatcherback to summary
public RequestDispatcher getRequestDispatcher(String path)

Overrides jakarta.servlet.ServletRequestWrapper.getRequestDispatcher.

Implements jakarta.servlet.ServletRequest.getRequestDispatcher.

Return a RequestDispatcher that wraps the resource at the specified path, which may be interpreted as relative to the current request path.

Parameters
path:String

Path of the resource to be wrapped

Returns:RequestDispatcher

Doc from jakarta.servlet.ServletRequest.getRequestDispatcher.

a RequestDispatcher object that acts as a wrapper for the resource at the specified path, or null if the servlet container cannot return a RequestDispatcher

Annotations
@Override
getRequestURIback to summary
public String getRequestURI()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getRequestURI.

Implements jakarta.servlet.http.HttpServletRequest.getRequestURI.

Override the getRequestURI() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getRequestURI.

a String containing the part of the URL from the protocol name up to the query string

Annotations
@Override
getRequestURLback to summary
public StringBuffer getRequestURL()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getRequestURL.

Implements jakarta.servlet.http.HttpServletRequest.getRequestURL.

Override the getRequestURL() method of the wrapped request.

Returns:StringBuffer

Doc from jakarta.servlet.http.HttpServletRequest.getRequestURL.

a StringBuffer object containing the reconstructed URL

Annotations
@Override
getServletContextback to summary
public ServletContext getServletContext()

Overrides jakarta.servlet.ServletRequestWrapper.getServletContext.

Implements jakarta.servlet.ServletRequest.getServletContext.

Doc from jakarta.servlet.ServletRequestWrapper.getServletContext.

The default behavior of this method is to return getServletContext() on the wrapped request object.

Returns:ServletContext

Doc from jakarta.servlet.ServletRequest.getServletContext.

TODO

Annotations
@Override
getServletPathback to summary
public String getServletPath()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getServletPath.

Implements jakarta.servlet.http.HttpServletRequest.getServletPath.

Override the getServletPath() method of the wrapped request.

Returns:String

Doc from jakarta.servlet.http.HttpServletRequest.getServletPath.

a String, canonicalized by the web container, containing the name or path of the servlet being called, as specified in the request URL, or an empty string if the servlet used to process the request is matched using the "/*" pattern.

Annotations
@Override
getSessionback to summary
public HttpSession getSession()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getSession.

Implements jakarta.servlet.http.HttpServletRequest.getSession.

Return the session associated with this Request, creating one if necessary.

Returns:HttpSession

Doc from jakarta.servlet.http.HttpServletRequest.getSession.

the HttpSession associated with this request

Annotations
@Override
getSessionback to summary
public HttpSession getSession(boolean create)

Overrides jakarta.servlet.http.HttpServletRequestWrapper.getSession.

Implements jakarta.servlet.http.HttpServletRequest.getSession.

Return the session associated with this Request, creating one if necessary and requested.

Parameters
create:boolean

Create a new session if one does not exist

Returns:HttpSession

Doc from jakarta.servlet.http.HttpServletRequest.getSession.

the HttpSession associated with this request or null if create is false and the request has no valid session

Annotations
@Override
getSpecialback to summary
protected int getSpecial(String name)

Get a special attribute.

Returns:int

the special attribute pos, or -1 if it is not a special attribute

isRequestedSessionIdValidback to summary
public boolean isRequestedSessionIdValid()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.isRequestedSessionIdValid.

Implements jakarta.servlet.http.HttpServletRequest.isRequestedSessionIdValid.

Returns true if the request specifies a JSESSIONID that is valid within the context of this ApplicationHttpRequest, false otherwise.

Returns:boolean

true if the request specifies a JSESSIONID that is valid within the context of this ApplicationHttpRequest, false otherwise.

Annotations
@Override
isSpecialback to summary
protected boolean isSpecial(String name)

Is this attribute name one of the special ones that is added only for included servlets?

Parameters
name:String

Attribute name to be tested

mergeParametersback to summary
private void mergeParameters()

Merge the parameters from the saved query parameter string (if any), and the parameters already present on this request (if any), such that the parameter values from the query string show up first if there are duplicate parameter names.

mergeValuesback to summary
private String[] mergeValues(String[] values1, String[] values2)

Merge the two sets of parameter values into a single String array.

Parameters
values1:String[]

First set of values

values2:String[]

Second set of values

newPushBuilderback to summary
public PushBuilder newPushBuilder()

Overrides jakarta.servlet.http.HttpServletRequestWrapper.newPushBuilder.

Overrides default jakarta.servlet.http.HttpServletRequest.newPushBuilder.

Doc from jakarta.servlet.http.HttpServletRequestWrapper.newPushBuilder.

Obtain a builder for generating push requests. PushBuilder documents how this request will be used as the basis for a push request. Each call to this method will return a new instance, independent of any previous instance obtained.

The default behavior of this method is to return HttpServletRequest#newPushBuilder() on the wrapped request object.

Returns:PushBuilder

Doc from jakarta.servlet.http.HttpServletRequest.newPushBuilder.

A builder that can be used to generate push requests based on this request or null if push is not supported. Note that even if a PushBuilder instance is returned, by the time that PushBuilder#push() is called, it may no longer be valid to push a request and the push request will be ignored.

Annotations
@Override
parseParametersback to summary
pack-priv void parseParameters()

Parses the parameters of this request. If parameters are present in both the query string and the request content, they are merged.

recycleback to summary
public void recycle()

Recycle this request

removeAttributeback to summary
public void removeAttribute(String name)

Overrides jakarta.servlet.ServletRequestWrapper.removeAttribute.

Implements jakarta.servlet.ServletRequest.removeAttribute.

Override the removeAttribute() method of the wrapped request.

Parameters
name:String

Name of the attribute to remove

Annotations
@Override
removeSpecialback to summary
protected boolean removeSpecial(String name)

Remove a special attribute.

Returns:boolean

true if the attribute was a special attribute, false otherwise

setAttributeback to summary
public void setAttribute(String name, Object value)

Overrides jakarta.servlet.ServletRequestWrapper.setAttribute.

Implements jakarta.servlet.ServletRequest.setAttribute.

Override the setAttribute() method of the wrapped request.

Parameters
name:String

Name of the attribute to set

value:Object

Value of the attribute to set

Annotations
@Override
setContextPathback to summary
pack-priv void setContextPath(String contextPath)

Set the context path for this request.

Parameters
contextPath:String

The new context path

setMappingback to summary
pack-priv void setMapping(HttpServletMapping mapping)
setPathInfoback to summary
pack-priv void setPathInfo(String pathInfo)

Set the path information for this request.

Parameters
pathInfo:String

The new path info

setQueryParamsback to summary
pack-priv void setQueryParams(String queryString)

Save query parameters for this request.

Parameters
queryString:String

The query string containing parameters for this request

setQueryStringback to summary
pack-priv void setQueryString(String queryString)

Set the query string for this request.

Parameters
queryString:String

The new query string

setRequestback to summary
pack-priv void setRequest(HttpServletRequest request)

Set the request that we are wrapping.

Parameters
request:HttpServletRequest

The new wrapped request

setRequestURIback to summary
pack-priv void setRequestURI(String requestURI)

Set the request URI for this request.

Parameters
requestURI:String

The new request URI

setServletPathback to summary
pack-priv void setServletPath(String servletPath)

Set the servlet path for this request.

Parameters
servletPath:String

The new servlet path

setSpecialback to summary
protected boolean setSpecial(String name, Object value)

Set a special attribute.

Returns:boolean

true if the attribute was a special attribute, false otherwise

org.apache.catalina.core back to summary

protected Class ApplicationHttpRequest.AttributeNamesEnumerator

extends Object
implements Enumeration<String>
Class Inheritance
  • java.lang.Object
  • org.apache.catalina.core.ApplicationHttpRequest.AttributeNamesEnumerator
All Implemented Interfaces
java.util.Enumeration

Utility class used to expose the special attributes as being available as request attributes.

Field Summary

Modifier and TypeField and Description
protected final int
protected String
protected final Enumeration<String>
protected int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
public boolean
hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

public String
nextElement()

Implements java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lastback to summary
protected final int last
nextback to summary
protected String next
parentEnumerationback to summary
protected final Enumeration<String> parentEnumeration
posback to summary
protected int pos

Constructor Detail

AttributeNamesEnumeratorback to summary
public AttributeNamesEnumerator()

Method Detail

findNextback to summary
protected String findNext()
hasMoreElementsback to summary
public boolean hasMoreElements()

Implements java.util.Enumeration.hasMoreElements.

Doc from java.util.Enumeration.hasMoreElements.

Tests if this enumeration contains more elements.

Returns:boolean

true if and only if this enumeration object contains at least one more element to provide; false otherwise.

Annotations
@Override
nextElementback to summary
public String nextElement()

Implements java.util.Enumeration.nextElement.

Doc from java.util.Enumeration.nextElement.

Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Returns:String

the next element of this enumeration.

Annotations
@Override