Class PwcCoyoteRequest
- java.lang.Object
-
- org.apache.catalina.connector.Request
-
- com.sun.enterprise.web.pwc.connector.coyote.PwcCoyoteRequest
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest
,jakarta.servlet.ServletRequest
,HttpRequest
,Request
public class PwcCoyoteRequest extends Request
Customized version of the Tomcat 5 CoyoteRequest This is required for supporting Web Programmatic Login and setting the request encoding (charset).- Author:
- Jeanfrancois Arcand, Jan Luehe
-
-
Field Summary
-
Fields inherited from class org.apache.catalina.connector.Request
attributes, authType, CACHED_POST_LEN, checkRestrictedResources, checkUnsuccessfulSessionFind, connector, context, cookies, cookiesParsed, coyoteRequest, defaultContextMaskingFacade, defaultLocale, discardDisconnectEvent, dispatcherTypeAttr, facade, filterChain, formats, hostValve, info, inputBuffer, inputStream, localAddr, locales, localesParsed, localName, localPort, mappingData, parameterMap, parametersProcessed, postData, reader, remoteAddr, remoteHost, remotePort, requestDispatcherPath, requestedSessionCookie, requestedSessionCookiePath, requestedSessionId, requestedSessionURL, requestedSessionVersion, response, secure, servletContext, session, sessionParsed, socket, subject, URIConverter, uriParamsCC, userPrincipal, usingInputStream, usingReader, wrapper
-
-
Constructor Summary
Constructors Constructor Description PwcCoyoteRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureSessionCookie(jakarta.servlet.http.Cookie cookie)
Configures the given JSESSIONID cookie.String
getCharacterEncoding()
Return the character encoding for this Request.protected byte[]
getPostBody()
Gets the POST body of this request.BufferedReader
getReader()
Read the Reader wrapping the input stream for this Request.protected jakarta.servlet.http.Cookie
makeCookie(org.glassfish.grizzly.http.Cookie scookie)
void
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.void
setContext(Context ctx)
Set the Context within which this Request is being processed.-
Methods inherited from class org.apache.catalina.connector.Request
addCookie, addHeader, addLocale, addParameter, authenticate, changeSessionId, clearCookies, clearHeaders, clearLocales, clearParameters, convertURI, createInputStream, decrementDispatchDepth, disableAsyncSupport, doGetSession, finishRequest, generateSessionId, getAsyncContext, getAttribute, getAttributeNames, getAuthorization, getAuthType, getCheckRestrictedResources, getConnector, getContentLength, getContentLengthLong, getContentType, getContext, getContextPath, getContextPath, getCookies, getCoyoteRequest, getDateHeader, getDecodedRequestURI, getDecodedRequestURI, getDispatcherType, getFilterChain, getHeader, getHeaderNames, getHeaders, getHost, getHttpServletMapping, getHttpUpgradeHandler, getInfo, getInputStream, getIntHeader, getJrouteId, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getMappingData, getMaxDispatchDepth, getMethod, getNote, getNoteNames, getParameter, getParameterMap, getParameterNames, getParameterValues, getPart, getParts, getPathInfo, getPathTranslated, getProtocol, getQueryString, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRemoteUser, getRequest, getRequest, getRequestDispatcher, getRequestedSessionId, getRequestPathMB, getRequestURI, getRequestURI, getRequestURL, getRequestURL, getResponse, getScheme, getServerName, getServerPort, getServletContext, getServletPath, getSession, getSession, getSessionInternal, getSessionInternal, getSocket, getStream, getTrailerFields, getUnsuccessfulSessionFind, getURIConverter, getUserPrincipal, getWebConnection, getWrapper, incrementDispatchDepth, initialiseHttpUpgradeHandler, isAlpha, isAsyncStarted, isAsyncSupported, isMaxDispatchDepthReached, isRequestedSessionIdFromCookie, isRequestedSessionIdFromSecureCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isSecure, isTrailerFieldsReady, isUpgrade, isUserInRole, lockSession, login, login, logout, makeCookie, newPushBuilder, obtainSessionId, parseCookies, parseJReplica, parseSessionCookiesId, parseSessionId, parseSessionVersion, readPostBody, removeAttribute, removeNote, replayPayload, setAttribute, setAuthType, setCharacterEncoding, setCheckRestrictedResources, setConnector, setContentLength, setContentType, setCookies, setCoyoteRequest, setDefaultContext, setEnforceScope, setFilterChain, setHost, setMappingData, setMaxDispatchDepth, setMethod, setNote, setPathInfo, setProtocol, setQueryString, setRemoteAddr, setRemoteHost, setRequestedSessionCookie, setRequestedSessionCookiePath, setRequestedSessionId, setRequestedSessionIdFromSecureCookie, setRequestedSessionURL, setRequestURI, setResponse, setSecure, setServerName, setServerPort, setServletPath, setSession, setSocket, setStream, setUnsuccessfulSessionFind, setUpgrade, setURIConverter, setUserPrincipal, setWebConnection, setWrapper, startAsync, startAsync, unlockSession, updatePaths, upgrade
-
-
-
-
Method Detail
-
setContext
public void setContext(Context ctx)
Description copied from class:Request
Set the Context within which this Request is being processed. This must be called as soon as the appropriate Context is identified, because it identifies the value to be returned bygetContextPath()
, and thus enables parsing of the request URI.- Specified by:
setContext
in interfaceRequest
- Overrides:
setContext
in classRequest
- Parameters:
ctx
- The newly associated Context
-
getReader
public BufferedReader getReader() throws IOException
Description copied from class:Request
Read the Reader wrapping the input stream for this Request. The default implementation wraps aBufferedReader
around the servlet input stream returned bycreateInputStream()
.- Specified by:
getReader
in interfacejakarta.servlet.ServletRequest
- Overrides:
getReader
in classRequest
- Throws:
IOException
- if an input/output error occurs
-
getCharacterEncoding
public String getCharacterEncoding()
Return the character encoding for this Request. If there is no request charset specified in the request, determines and sets the request charset using the locale-charset-info, locale-charset-map, and parameter-encoding elements provided in the sun-web.xml.- Specified by:
getCharacterEncoding
in interfacejakarta.servlet.ServletRequest
- Overrides:
getCharacterEncoding
in classRequest
-
configureSessionCookie
public void configureSessionCookie(jakarta.servlet.http.Cookie cookie)
Description copied from class:Request
Configures the given JSESSIONID cookie.- Overrides:
configureSessionCookie
in classRequest
- Parameters:
cookie
- The JSESSIONID cookie to be configured
-
recycle
public void recycle()
Description copied from class:Request
Release all object references, and initialize instance variables, in preparation for reuse of this object.
-
getPostBody
protected byte[] getPostBody() throws IOException
Gets the POST body of this request.- Overrides:
getPostBody
in classRequest
- Returns:
- The POST body of this request
- Throws:
IOException
-
makeCookie
protected jakarta.servlet.http.Cookie makeCookie(org.glassfish.grizzly.http.Cookie scookie)
- Overrides:
makeCookie
in classRequest
-
-