JavaScript is disabled on your browser.
javax.servlet.http

Class HttpServletRequestWrapper

    • Constructor Detail

      • HttpServletRequestWrapper

        public HttpServletRequestWrapper(HttpServletRequest wrappedRequest)
        Creates a new HttpServletRequestWrapper which wraps the passed HttpServletRequest
        Parameters:
        wrappedObject - the object to be wrapped
        Throws:
        java.lang.IllegalArgumentException - if wrappedObject is null
    • Method Detail

      • getAuthType

        public java.lang.String getAuthType()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getAuthType in interface HttpServletRequest
        Returns:
        Authorization scheme or null if not set
      • getCookies

        public Cookie[] getCookies()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getCookies in interface HttpServletRequest
        Returns:
        an array containing all the Cookies or an empty array if there are no cookies
      • getDateHeader

        public long getDateHeader(java.lang.String name)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getDateHeader in interface HttpServletRequest
        Parameters:
        name - the name of the header field (case insensitive)
        Returns:
        milliseconds since January 1, 1970, 00:00:00 GMT or -1 if the header does not exist.
      • getHeader

        public java.lang.String getHeader(java.lang.String name)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getHeader in interface HttpServletRequest
        Parameters:
        name - the name of the header field (case insensitive)
        Returns:
        The value of the header or null if the header does not exist
      • getHeaders

        public java.util.Enumeration getHeaders(java.lang.String name)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getHeaders in interface HttpServletRequest
      • getHeaderNames

        public java.util.Enumeration getHeaderNames()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getHeaderNames in interface HttpServletRequest
        Returns:
        Enumeration of all the header names or when this operation is not supported an empty Enumeration or null.
      • getIntHeader

        public int getIntHeader(java.lang.String name)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getIntHeader in interface HttpServletRequest
        Parameters:
        name - the name of the header field (case insensitive)
        Returns:
        the value of the header field or -1 if the header does not exist
      • getMethod

        public java.lang.String getMethod()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getMethod in interface HttpServletRequest
        Returns:
        The method in question
      • getPathInfo

        public java.lang.String getPathInfo()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getPathInfo in interface HttpServletRequest
        Returns:
        The path info or null when there is no path information.
      • getPathTranslated

        public java.lang.String getPathTranslated()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getPathTranslated in interface HttpServletRequest
        Returns:
        The filesystem path to the file indicated by the path info or null if there is no path info
      • getContextPath

        public java.lang.String getContextPath()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getContextPath in interface HttpServletRequest
      • getQueryString

        public java.lang.String getQueryString()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getQueryString in interface HttpServletRequest
        Returns:
        the query string or null if there is no such part
      • getRemoteUser

        public java.lang.String getRemoteUser()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getRemoteUser in interface HttpServletRequest
        Returns:
        User name or null if the username wasn't in the HTTP authentication.
      • isUserInRole

        public boolean isUserInRole(java.lang.String role)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        isUserInRole in interface HttpServletRequest
      • getUserPrincipal

        public java.security.Principal getUserPrincipal()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getUserPrincipal in interface HttpServletRequest
      • getRequestedSessionId

        public java.lang.String getRequestedSessionId()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getRequestedSessionId in interface HttpServletRequest
        Returns:
        The requested session id
      • getRequestURI

        public java.lang.String getRequestURI()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getRequestURI in interface HttpServletRequest
        Returns:
        The requested URI
      • getRequestURL

        public java.lang.StringBuffer getRequestURL()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getRequestURL in interface HttpServletRequest
        Returns:
        a StringBuffer containing the request URL. this Stringbuffer can be easily appended to, to add the query string if needed.
      • getServletPath

        public java.lang.String getServletPath()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getServletPath in interface HttpServletRequest
      • getSession

        public HttpSession getSession(boolean create)
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getSession in interface HttpServletRequest
        Returns:
        The HttpSession connected with the client sending the request.
      • getSession

        public HttpSession getSession()
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getSession in interface HttpServletRequest
        Returns:
        The HttpSession connected with the client sending the request.
      • authenticate

        public boolean authenticate(HttpServletResponse response)
         throws java.io.IOException,
         ServletException 
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        authenticate in interface HttpServletRequest
        Returns:
        true if userPrincipal, remoteUser, and authType values have been established correctly on the request
        Throws:
        java.io.IOException
        ServletException
        Since:
        3.0
      • getParts

        public java.util.Collection<Part> getParts()
         throws java.io.IOException,
         ServletException 
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getParts in interface HttpServletRequest
        Throws:
        ServletException - if this request is not of type multipart/form-data
        java.io.IOException
        Since:
        3.0
      • getPart

        public Part getPart(java.lang.String name)
         throws java.io.IOException,
         ServletException 
        By default passes the call to the underlying HttpServletRequest
        Specified by:
        getPart in interface HttpServletRequest
        Throws:
        ServletException - if this request is not of type multipart/form-data
        java.io.IOException
        Since:
        3.0

AltStyle によって変換されたページ (->オリジナル) /