public class PreventSessionCreationHttpServletRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
HttpSession を生成できないようにした HttpServletRequest のラッパークラス。| Constructor and Description |
|---|
PreventSessionCreationHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
コンストラクタ。
|
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.HttpSession |
getSession()
このクラスは
HttpSessionを生成できないようにしているため、このメソッドは常に例外をスローします。 |
javax.servlet.http.HttpSession |
getSession(boolean create)
このクラスは
HttpSessionを生成できないようにしているため、引数にtrueを渡した場合は例外をスローします。
引数にfalseを渡した場合は、常にnullを返します。 |
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgradegetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncpublic PreventSessionCreationHttpServletRequestWrapper(javax.servlet.http.HttpServletRequest request)
request - ラップ対象のリクエストオブジェクトpublic javax.servlet.http.HttpSession getSession()
HttpSessionを生成できないようにしているため、このメソッドは常に例外をスローします。getSession in interface javax.servlet.http.HttpServletRequestgetSession in class javax.servlet.http.HttpServletRequestWrapperHttpSessionを返すことはありませんjava.lang.RuntimeException - このメソッドを実行した場合public javax.servlet.http.HttpSession getSession(boolean create)
HttpSessionを生成できないようにしているため、引数にtrueを渡した場合は例外をスローします。
引数にfalseを渡した場合は、常にnullを返します。getSession in interface javax.servlet.http.HttpServletRequestgetSession in class javax.servlet.http.HttpServletRequestWrappercreate - true を渡した場合は例外をスローしますfalseを渡した場合のみ、nullを返しますjava.lang.RuntimeException - 引数にtrueを渡した場合