类 MockHttpServletRequest
- 所有已实现的接口:
jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest
HttpServletRequest interface.
The default, preferred Locale for the server mocked by this request
is Locale.ENGLISH. This value can be changed via addPreferredLocale(java.util.Locale)
or setPreferredLocales(java.util.List<java.util.Locale>).
this set of mocks is designed on a Servlet 4.0 baseline.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Rod Johnson, Rick Evans, Mark Fisher, Chris Beams, Sam Brannen, Brian Clozel
-
字段概要
字段修饰符和类型字段说明private booleanprivate MockAsyncContextprivate booleanprivate booleanprivate Stringprivate Stringprivate static final Stringprivate byte[]private Stringprivate Stringprivate jakarta.servlet.http.Cookie[]private static final String[]Date formats as specified in the HTTP RFC.static final StringThe default protocol: 'HTTP/1.1'.static final StringThe default remote address: '127.0.0.1'.static final StringThe default remote host: 'localhost'.static final StringThe default scheme: 'http'.static final StringThe default server address: '127.0.0.1'.static final StringThe default server name: 'localhost'.static final intThe default server port: '80'.private jakarta.servlet.DispatcherTypeprivate static final BufferedReaderprivate static final TimeZoneprivate final Map<String,HeaderValueHolder> private static final Stringprivate static final Stringprivate jakarta.servlet.http.HttpServletMappingprivate jakarta.servlet.ServletInputStreamprivate Stringprivate final LinkedList<Locale>List of locales in descending order.private Stringprivate intprivate Stringprivate final cn.taketoday.util.MultiValueMap<String,jakarta.servlet.http.Part> private Stringprivate Stringprivate Stringprivate BufferedReaderprivate Stringprivate Stringprivate intprivate Stringprivate Stringprivate booleanprivate booleanprivate booleanprivate Stringprivate Stringprivate booleanprivate Stringprivate intprivate final jakarta.servlet.ServletContextprivate Stringprivate jakarta.servlet.http.HttpSessionprivate Principal从接口继承的字段 jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
构造器概要
构造器构造器说明Create a newMockHttpServletRequestwith a defaultMockServletContext.MockHttpServletRequest(jakarta.servlet.ServletContext servletContext) Create a newMockHttpServletRequestwith the suppliedServletContext.MockHttpServletRequest(jakarta.servlet.ServletContext servletContext, String method, String requestURI) Create a newMockHttpServletRequestwith the suppliedServletContext,method, andrequestURI.MockHttpServletRequest(String method, String requestURI) Create a newMockHttpServletRequestwith a defaultMockServletContext. -
方法概要
修饰符和类型方法说明voidAdd an HTTP header entry for the given name.voidaddParameter(String name, String value) Add a single value for the specified HTTP parameter.voidaddParameter(String name, String... values) Add an array of values for the specified HTTP parameter.voidaddParameters(Map<String, ?> params) Add all provided parameters without replacing any existing values.voidaddPart(jakarta.servlet.http.Part part) voidaddPreferredLocale(Locale locale) Add a new preferred locale, before any existing locales.voidaddUserRole(String role) booleanauthenticate(jakarta.servlet.http.HttpServletResponse response) The implementation of this (Servlet 3.1+) method callsMockHttpSession.changeSessionId()if the session is a mock session.protected voidCheck whether this request is still active (that is, not completed yet), throwing an IllegalStateException if not active anymore.voidClear all of this request's attributes.voidclose()Mark this request as completed, keeping its state.private jakarta.servlet.http.MappingMatchBest effort to detect a Servlet path mapping, e.g.private voiddoAddHeaderValue(String name, Object value, boolean replace) private static StringencodeCookies(jakarta.servlet.http.Cookie... cookies) jakarta.servlet.AsyncContextgetAttribute(String name) byte[]Get the content of the request body as a byte array.Get the content of the request body as aString, using the configured character encoding.intlongjakarta.servlet.http.Cookie[]longgetDateHeader(String name) Return the long timestamp for the date header with the givenname.jakarta.servlet.DispatcherTypegetHeaders(String name) jakarta.servlet.http.HttpServletMappingjakarta.servlet.ServletInputStreamintgetIntHeader(String name) Return the first preferred locale configured in this mock request.Return an enumeration of the preferred locales configured in this mock request.intgetParameter(String name) String[]getParameterValues(String name) jakarta.servlet.http.PartCollection<jakarta.servlet.http.Part>getParts()intjakarta.servlet.RequestDispatchergetRequestDispatcher(String path) intjakarta.servlet.ServletConnectionjakarta.servlet.ServletContextReturn the ServletContext that this request is associated with.jakarta.servlet.http.HttpSessionjakarta.servlet.http.HttpSessiongetSession(boolean create) voidInvalidate this request, clearing its state.booleanisActive()Return whether this request is still active (that is, not completed yet).booleanbooleanbooleanbooleanbooleanbooleanisSecure()booleanisUserInRole(String role) voidvoidlogout()private longparseDateHeader(String name, String value) voidRemove all existing parameters.voidremoveAttribute(String name) voidremoveHeader(String name) Remove already registered entries for the specified HTTP header, if any.voidremoveParameter(String name) Remove already registered values for the specified HTTP parameter, if any.voidsetAsyncContext(MockAsyncContext asyncContext) voidsetAsyncStarted(boolean asyncStarted) voidsetAsyncSupported(boolean asyncSupported) voidsetAttribute(String name, Object value) voidsetAuthType(String authType) voidsetCharacterEncoding(String characterEncoding) voidsetContent(byte[] content) Set the content of the request body as a byte array.voidsetContentType(String contentType) voidsetContextPath(String contextPath) voidsetCookies(jakarta.servlet.http.Cookie... cookies) voidsetDispatcherType(jakarta.servlet.DispatcherType dispatcherType) voidsetHttpServletMapping(jakarta.servlet.http.HttpServletMapping httpServletMapping) voidsetLocalAddr(String localAddr) voidsetLocalName(String localName) voidsetLocalPort(int localPort) voidvoidsetParameter(String name, String value) Set a single value for the specified HTTP parameter.voidsetParameter(String name, String... values) Set an array of values for the specified HTTP parameter.voidsetParameters(Map<String, ?> params) Set all provided parameters replacing any existing values for the provided parameter names.voidsetPathInfo(String pathInfo) voidsetPreferredLocales(List<Locale> locales) Set the list of preferred locales, in descending order, effectively replacing any existing locales.voidsetProtocol(String protocol) voidsetQueryString(String queryString) voidsetRemoteAddr(String remoteAddr) voidsetRemoteHost(String remoteHost) voidsetRemotePort(int remotePort) voidsetRemoteUser(String remoteUser) voidsetRequestedSessionId(String requestedSessionId) voidsetRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie) voidsetRequestedSessionIdFromURL(boolean requestedSessionIdFromURL) voidsetRequestedSessionIdValid(boolean requestedSessionIdValid) voidsetRequestURI(String requestURI) voidvoidsetSecure(boolean secure) Set the booleansecureflag indicating whether the mock request was made using a secure channel, such as HTTPS.voidsetServerName(String serverName) voidsetServerPort(int serverPort) voidsetServletPath(String servletPath) voidsetSession(jakarta.servlet.http.HttpSession session) voidsetUserPrincipal(Principal userPrincipal) jakarta.servlet.AsyncContextjakarta.servlet.AsyncContextstartAsync(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) private voidprivate void<T extends jakarta.servlet.http.HttpUpgradeHandler>
T从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 jakarta.servlet.http.HttpServletRequest
getTrailerFields, isTrailerFieldsReady, newPushBuilder
-
字段详细资料
-
HTTP
- 另请参阅:
-
HTTPS
- 另请参阅:
-
CHARSET_PREFIX
- 另请参阅:
-
GMT
-
EMPTY_BUFFERED_READER
-
DATE_FORMATS
Date formats as specified in the HTTP RFC. -
DEFAULT_PROTOCOL
The default protocol: 'HTTP/1.1'.- 另请参阅:
-
DEFAULT_SCHEME
The default scheme: 'http'.- 另请参阅:
-
DEFAULT_SERVER_ADDR
The default server address: '127.0.0.1'.- 另请参阅:
-
DEFAULT_SERVER_NAME
The default server name: 'localhost'.- 另请参阅:
-
DEFAULT_SERVER_PORT
public static final int DEFAULT_SERVER_PORTThe default server port: '80'.- 另请参阅:
-
DEFAULT_REMOTE_ADDR
The default remote address: '127.0.0.1'.- 另请参阅:
-
DEFAULT_REMOTE_HOST
The default remote host: 'localhost'.- 另请参阅:
-
servletContext
private final jakarta.servlet.ServletContext servletContext -
active
private boolean active -
attributes
-
characterEncoding
-
@Nullable private byte[] content
-
contentType
-
inputStream
@Nullable private jakarta.servlet.ServletInputStream inputStream -
reader
-
parameters
-
protocol
-
scheme
-
serverName
-
serverPort
private int serverPort -
remoteAddr
-
remoteHost
-
locales
List of locales in descending order. -
secure
private boolean secure -
remotePort
private int remotePort -
localName
-
localAddr
-
localPort
private int localPort -
asyncStarted
private boolean asyncStarted -
asyncSupported
private boolean asyncSupported -
asyncContext
-
dispatcherType
private jakarta.servlet.DispatcherType dispatcherType -
authType
-
cookies
@Nullable private jakarta.servlet.http.Cookie[] cookies -
headers
-
method
-
pathInfo
-
contextPath
-
queryString
-
remoteUser
-
userRoles
-
userPrincipal
-
requestedSessionId
-
requestURI
-
servletPath
-
session
@Nullable private jakarta.servlet.http.HttpSession session -
requestedSessionIdValid
private boolean requestedSessionIdValid -
requestedSessionIdFromCookie
private boolean requestedSessionIdFromCookie -
requestedSessionIdFromURL
private boolean requestedSessionIdFromURL -
parts
-
httpServletMapping
@Nullable private jakarta.servlet.http.HttpServletMapping httpServletMapping
-
-
构造器详细资料
-
MockHttpServletRequest
public MockHttpServletRequest()Create a newMockHttpServletRequestwith a defaultMockServletContext. -
MockHttpServletRequest
Create a newMockHttpServletRequestwith a defaultMockServletContext.- 参数:
method- the request method (may benull)requestURI- the request URI (may benull)- 另请参阅:
-
MockHttpServletRequest
public MockHttpServletRequest(@Nullable jakarta.servlet.ServletContext servletContext) Create a newMockHttpServletRequestwith the suppliedServletContext.- 参数:
servletContext- the ServletContext that the request runs in (may benullto use a defaultMockServletContext)- 另请参阅:
-
MockHttpServletRequest
public MockHttpServletRequest(@Nullable jakarta.servlet.ServletContext servletContext, @Nullable String method, @Nullable String requestURI) Create a newMockHttpServletRequestwith the suppliedServletContext,method, andrequestURI.The preferred locale will be set to
Locale.ENGLISH.- 参数:
servletContext- the ServletContext that the request runs in (may benullto use a defaultMockServletContext)method- the request method (may benull)requestURI- the request URI (may benull)- 另请参阅:
-
-
方法详细资料
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()Return the ServletContext that this request is associated with. (Not available in the standard HttpServletRequest interface for some reason.)- 指定者:
getServletContext在接口中jakarta.servlet.ServletRequest
-
isActive
public boolean isActive()Return whether this request is still active (that is, not completed yet). -
close
public void close()Mark this request as completed, keeping its state. -
invalidate
public void invalidate()Invalidate this request, clearing its state. -
checkActive
Check whether this request is still active (that is, not completed yet), throwing an IllegalStateException if not active anymore. -
getAttribute
- 指定者:
getAttribute在接口中jakarta.servlet.ServletRequest
-
getAttributeNames
- 指定者:
getAttributeNames在接口中jakarta.servlet.ServletRequest
-
getCharacterEncoding
- 指定者:
getCharacterEncoding在接口中jakarta.servlet.ServletRequest
-
setCharacterEncoding
- 指定者:
setCharacterEncoding在接口中jakarta.servlet.ServletRequest
-
updateContentTypeHeader
private void updateContentTypeHeader() -
setContent
public void setContent(@Nullable byte[] content) Set the content of the request body as a byte array.If the supplied byte array represents text such as XML or JSON, the
character encodingshould typically be set as well. -
getContentAsByteArray
@Nullable public byte[] getContentAsByteArray()Get the content of the request body as a byte array.- 返回:
- the content as a byte array (potentially
null) - 另请参阅:
-
getContentAsString
@Nullable public String getContentAsString() throws IllegalStateException, UnsupportedEncodingExceptionGet the content of the request body as aString, using the configured character encoding.- 返回:
- the content as a
String, potentiallynull - 抛出:
IllegalStateException- if the character encoding has not been setUnsupportedEncodingException- if the character encoding is not supported- 另请参阅:
-
getContentLength
public int getContentLength()- 指定者:
getContentLength在接口中jakarta.servlet.ServletRequest
-
getContentLengthLong
public long getContentLengthLong()- 指定者:
getContentLengthLong在接口中jakarta.servlet.ServletRequest
-
setContentType
-
getContentType
- 指定者:
getContentType在接口中jakarta.servlet.ServletRequest
-
getInputStream
public jakarta.servlet.ServletInputStream getInputStream()- 指定者:
getInputStream在接口中jakarta.servlet.ServletRequest
-
setParameter
Set a single value for the specified HTTP parameter.If there are already one or more values registered for the given parameter name, they will be replaced.
-
setParameter
Set an array of values for the specified HTTP parameter.If there are already one or more values registered for the given parameter name, they will be replaced.
-
setParameters
Set all provided parameters replacing any existing values for the provided parameter names. To add without replacing existing values, useaddParameters(java.util.Map). -
addParameter
Add a single value for the specified HTTP parameter.If there are already one or more values registered for the given parameter name, the given value will be added to the end of the list.
-
addParameter
Add an array of values for the specified HTTP parameter.If there are already one or more values registered for the given parameter name, the given values will be added to the end of the list.
-
addParameters
Add all provided parameters without replacing any existing values. To replace existing values, usesetParameters(java.util.Map). -
removeParameter
Remove already registered values for the specified HTTP parameter, if any. -
removeAllParameters
public void removeAllParameters()Remove all existing parameters. -
getParameter
- 指定者:
getParameter在接口中jakarta.servlet.ServletRequest
-
getParameterNames
- 指定者:
getParameterNames在接口中jakarta.servlet.ServletRequest
-
getParameterValues
- 指定者:
getParameterValues在接口中jakarta.servlet.ServletRequest
-
getParameterMap
- 指定者:
getParameterMap在接口中jakarta.servlet.ServletRequest
-
setProtocol
-
getProtocol
- 指定者:
getProtocol在接口中jakarta.servlet.ServletRequest
-
setScheme
-
getScheme
- 指定者:
getScheme在接口中jakarta.servlet.ServletRequest
-
setServerName
-
getServerName
- 指定者:
getServerName在接口中jakarta.servlet.ServletRequest
-
setServerPort
public void setServerPort(int serverPort) -
getServerPort
public int getServerPort()- 指定者:
getServerPort在接口中jakarta.servlet.ServletRequest
-
getReader
- 指定者:
getReader在接口中jakarta.servlet.ServletRequest- 抛出:
UnsupportedEncodingException
-
setRemoteAddr
-
getRemoteAddr
- 指定者:
getRemoteAddr在接口中jakarta.servlet.ServletRequest
-
setRemoteHost
-
getRemoteHost
- 指定者:
getRemoteHost在接口中jakarta.servlet.ServletRequest
-
setAttribute
- 指定者:
setAttribute在接口中jakarta.servlet.ServletRequest
-
removeAttribute
- 指定者:
removeAttribute在接口中jakarta.servlet.ServletRequest
-
clearAttributes
public void clearAttributes()Clear all of this request's attributes. -
addPreferredLocale
Add a new preferred locale, before any existing locales. -
setPreferredLocales
Set the list of preferred locales, in descending order, effectively replacing any existing locales.- 从以下版本开始:
- 4.0
- 另请参阅:
-
updateAcceptLanguageHeader
private void updateAcceptLanguageHeader() -
getLocale
Return the first preferred locale configured in this mock request.If no locales have been explicitly configured, the default, preferred
Localefor the server mocked by this request isLocale.ENGLISH.In contrast to the Servlet specification, this mock implementation does not take into consideration any locales specified via the
Accept-Languageheader.- 指定者:
getLocale在接口中jakarta.servlet.ServletRequest- 另请参阅:
-
ServletRequest.getLocale()addPreferredLocale(Locale)setPreferredLocales(List)
-
getLocales
Return an enumeration of the preferred locales configured in this mock request.If no locales have been explicitly configured, the default, preferred
Localefor the server mocked by this request isLocale.ENGLISH.In contrast to the Servlet specification, this mock implementation does not take into consideration any locales specified via the
Accept-Languageheader.- 指定者:
getLocales在接口中jakarta.servlet.ServletRequest- 另请参阅:
-
ServletRequest.getLocales()addPreferredLocale(Locale)setPreferredLocales(List)
-
setSecure
public void setSecure(boolean secure) Set the booleansecureflag indicating whether the mock request was made using a secure channel, such as HTTPS. -
isSecure
public boolean isSecure()- 指定者:
isSecure在接口中jakarta.servlet.ServletRequest- 另请参阅:
-
ServletRequest.isSecure()
-
getRequestDispatcher
- 指定者:
getRequestDispatcher在接口中jakarta.servlet.ServletRequest
-
setRemotePort
public void setRemotePort(int remotePort) -
getRemotePort
public int getRemotePort()- 指定者:
getRemotePort在接口中jakarta.servlet.ServletRequest
-
setLocalName
-
getLocalName
- 指定者:
getLocalName在接口中jakarta.servlet.ServletRequest
-
setLocalAddr
-
getLocalAddr
- 指定者:
getLocalAddr在接口中jakarta.servlet.ServletRequest
-
setLocalPort
public void setLocalPort(int localPort) -
getLocalPort
public int getLocalPort()- 指定者:
getLocalPort在接口中jakarta.servlet.ServletRequest
-
startAsync
public jakarta.servlet.AsyncContext startAsync()- 指定者:
startAsync在接口中jakarta.servlet.ServletRequest
-
startAsync
public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest request, @Nullable jakarta.servlet.ServletResponse response) - 指定者:
startAsync在接口中jakarta.servlet.ServletRequest
-
setAsyncStarted
public void setAsyncStarted(boolean asyncStarted) -
isAsyncStarted
public boolean isAsyncStarted()- 指定者:
isAsyncStarted在接口中jakarta.servlet.ServletRequest
-
setAsyncSupported
public void setAsyncSupported(boolean asyncSupported) -
isAsyncSupported
public boolean isAsyncSupported()- 指定者:
isAsyncSupported在接口中jakarta.servlet.ServletRequest
-
setAsyncContext
-
getAsyncContext
@Nullable public jakarta.servlet.AsyncContext getAsyncContext()- 指定者:
getAsyncContext在接口中jakarta.servlet.ServletRequest
-
setDispatcherType
public void setDispatcherType(jakarta.servlet.DispatcherType dispatcherType) -
getDispatcherType
public jakarta.servlet.DispatcherType getDispatcherType()- 指定者:
getDispatcherType在接口中jakarta.servlet.ServletRequest
-
getRequestId
- 指定者:
getRequestId在接口中jakarta.servlet.ServletRequest
-
getProtocolRequestId
- 指定者:
getProtocolRequestId在接口中jakarta.servlet.ServletRequest
-
getServletConnection
public jakarta.servlet.ServletConnection getServletConnection()- 指定者:
getServletConnection在接口中jakarta.servlet.ServletRequest
-
setAuthType
-
getAuthType
- 指定者:
getAuthType在接口中jakarta.servlet.http.HttpServletRequest
-
setCookies
public void setCookies(@Nullable jakarta.servlet.http.Cookie... cookies) -
encodeCookies
-
getCookies
@Nullable public jakarta.servlet.http.Cookie[] getCookies()- 指定者:
getCookies在接口中jakarta.servlet.http.HttpServletRequest
-
addHeader
Add an HTTP header entry for the given name.While this method can take any
Objectas a parameter, it is recommended to use the following types:- String or any Object to be converted using
toString(); seegetHeader(java.lang.String). - String, Number, or Date for date headers; see
getDateHeader(java.lang.String). - String or Number for integer headers; see
getIntHeader(java.lang.String). String[]orCollection<String>for multiple values; seegetHeaders(java.lang.String).
- String or any Object to be converted using
-
doAddHeaderValue
-
removeHeader
Remove already registered entries for the specified HTTP header, if any. -
getDateHeader
Return the long timestamp for the date header with the givenname.If the internal value representation is a String, this method will try to parse it as a date using the supported date formats:
- "EEE, dd MMM yyyy HH:mm:ss zzz"
- "EEE, dd-MMM-yy HH:mm:ss zzz"
- "EEE MMM dd HH:mm:ss yyyy"
- 指定者:
getDateHeader在接口中jakarta.servlet.http.HttpServletRequest- 参数:
name- the header name- 另请参阅:
-
parseDateHeader
-
getHeader
- 指定者:
getHeader在接口中jakarta.servlet.http.HttpServletRequest
-
getHeaders
- 指定者:
getHeaders在接口中jakarta.servlet.http.HttpServletRequest
-
getHeaderNames
- 指定者:
getHeaderNames在接口中jakarta.servlet.http.HttpServletRequest
-
getIntHeader
- 指定者:
getIntHeader在接口中jakarta.servlet.http.HttpServletRequest
-
setMethod
-
getMethod
- 指定者:
getMethod在接口中jakarta.servlet.http.HttpServletRequest
-
setPathInfo
-
getPathInfo
- 指定者:
getPathInfo在接口中jakarta.servlet.http.HttpServletRequest
-
getPathTranslated
- 指定者:
getPathTranslated在接口中jakarta.servlet.http.HttpServletRequest
-
setContextPath
-
getContextPath
- 指定者:
getContextPath在接口中jakarta.servlet.http.HttpServletRequest
-
setQueryString
-
getQueryString
- 指定者:
getQueryString在接口中jakarta.servlet.http.HttpServletRequest
-
setRemoteUser
-
getRemoteUser
- 指定者:
getRemoteUser在接口中jakarta.servlet.http.HttpServletRequest
-
addUserRole
-
isUserInRole
- 指定者:
isUserInRole在接口中jakarta.servlet.http.HttpServletRequest
-
setUserPrincipal
-
getUserPrincipal
- 指定者:
getUserPrincipal在接口中jakarta.servlet.http.HttpServletRequest
-
setRequestedSessionId
-
getRequestedSessionId
- 指定者:
getRequestedSessionId在接口中jakarta.servlet.http.HttpServletRequest
-
setRequestURI
-
getRequestURI
- 指定者:
getRequestURI在接口中jakarta.servlet.http.HttpServletRequest
-
getRequestURL
- 指定者:
getRequestURL在接口中jakarta.servlet.http.HttpServletRequest
-
setServletPath
-
getServletPath
- 指定者:
getServletPath在接口中jakarta.servlet.http.HttpServletRequest
-
setSession
public void setSession(jakarta.servlet.http.HttpSession session) -
getSession
@Nullable public jakarta.servlet.http.HttpSession getSession(boolean create) - 指定者:
getSession在接口中jakarta.servlet.http.HttpServletRequest
-
getSession
@Nullable public jakarta.servlet.http.HttpSession getSession()- 指定者:
getSession在接口中jakarta.servlet.http.HttpServletRequest
-
changeSessionId
The implementation of this (Servlet 3.1+) method callsMockHttpSession.changeSessionId()if the session is a mock session. Otherwise it simply returns the current session id.- 指定者:
changeSessionId在接口中jakarta.servlet.http.HttpServletRequest
-
setRequestedSessionIdValid
public void setRequestedSessionIdValid(boolean requestedSessionIdValid) -
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()- 指定者:
isRequestedSessionIdValid在接口中jakarta.servlet.http.HttpServletRequest
-
setRequestedSessionIdFromCookie
public void setRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie) -
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()- 指定者:
isRequestedSessionIdFromCookie在接口中jakarta.servlet.http.HttpServletRequest
-
setRequestedSessionIdFromURL
public void setRequestedSessionIdFromURL(boolean requestedSessionIdFromURL) -
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()- 指定者:
isRequestedSessionIdFromURL在接口中jakarta.servlet.http.HttpServletRequest
-
authenticate
public boolean authenticate(jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException - 指定者:
authenticate在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
IOExceptionjakarta.servlet.ServletException
-
login
- 指定者:
login在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
jakarta.servlet.ServletException
-
logout
public void logout() throws jakarta.servlet.ServletException- 指定者:
logout在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
jakarta.servlet.ServletException
-
addPart
public void addPart(jakarta.servlet.http.Part part) -
getPart
@Nullable public jakarta.servlet.http.Part getPart(String name) throws IOException, jakarta.servlet.ServletException - 指定者:
getPart在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
IOExceptionjakarta.servlet.ServletException
-
getParts
public Collection<jakarta.servlet.http.Part> getParts() throws IOException, jakarta.servlet.ServletException- 指定者:
getParts在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
IOExceptionjakarta.servlet.ServletException
-
setHttpServletMapping
public void setHttpServletMapping(@Nullable jakarta.servlet.http.HttpServletMapping httpServletMapping) -
getHttpServletMapping
public jakarta.servlet.http.HttpServletMapping getHttpServletMapping()- 指定者:
getHttpServletMapping在接口中jakarta.servlet.http.HttpServletRequest
-
determineMappingMatch
@Nullable private jakarta.servlet.http.MappingMatch determineMappingMatch()Best effort to detect a Servlet path mapping, e.g."/foo/*", by checking whether the length of requestURI > contextPath + servletPath. to take into account the Servlet path when parsing the requestURI. -
upgrade
public <T extends jakarta.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, jakarta.servlet.ServletException - 指定者:
upgrade在接口中jakarta.servlet.http.HttpServletRequest- 抛出:
IOExceptionjakarta.servlet.ServletException
-