DummyRequest (Tomcat API Documentation)
Keywords: org.apache.catalina.core.DummyRequest class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.core
Class DummyRequest

    java.lang.Object
      org.apache.catalina.core.DummyRequest

All Implemented Interfaces:
  javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class DummyRequest
extends java.lang.Object
implements javax.servlet.http.HttpServletRequest

Dummy request object, used for request dispatcher mapping, as well as JSP precompilation.

Version:
  $Id: DummyRequest.java 939525 2010-04-30 00:36:35Z kkolinko $
Author:
  Remy Maucherat

Field Summary
`protected java.lang.String` | `contextPath`
`protected java.lang.String` | `decodedURI`
`protected javax.servlet.FilterChain` | `filterChain`
`protected java.lang.String` | `pathInfo`
`protected java.lang.String` | `queryString`
`protected java.lang.String` | `servletPath`
`protected Wrapper` | `wrapper`

Fields inherited from interface javax.servlet.http.HttpServletRequest
`BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH`

Constructor Summary
`DummyRequest()`
`DummyRequest(java.lang.String contextPath, java.lang.String decodedURI, java.lang.String queryString)`

Method Summary
`void` | `addCookie(javax.servlet.http.Cookie cookie)`
`void` | `addHeader(java.lang.String name, java.lang.String value)`
`void` | `addLocale(java.util.Locale locale)`
`void` | `addParameter(java.lang.String name, java.lang.String[] values)`
`void` | `clearCookies()`
`void` | `clearHeaders()`
`void` | `clearLocales()`
`void` | `clearParameters()`
`javax.servlet.ServletInputStream` | `createInputStream()`
`void` | `finishRequest()`
`java.lang.Object` | `getAttribute(java.lang.String name)`
`java.util.Enumeration` | `getAttributeNames()`
`java.lang.String` | `getAuthorization()`
`java.lang.String` | `getAuthType()`
`java.lang.String` | `getCharacterEncoding()`
`Connector` | `getConnector()`
`int` | `getContentLength()`
`java.lang.String` | `getContentType()`
`Context` | `getContext()`
`java.lang.String` | `getContextPath()`
`MessageBytes` | `getContextPathMB()`
`javax.servlet.http.Cookie[]` | `getCookies()`
`long` | `getDateHeader(java.lang.String name)`
`java.lang.String` | `getDecodedRequestURI()`
`MessageBytes` | `getDecodedRequestURIMB()`
`javax.servlet.FilterChain` | `getFilterChain()`
`java.lang.String` | `getHeader(java.lang.String name)`
`java.util.Enumeration` | `getHeaderNames()`
`java.util.Enumeration` | `getHeaders(java.lang.String name)`
`Host` | `getHost()`
`java.lang.String` | `getInfo()`
`javax.servlet.ServletInputStream` | `getInputStream()`
`int` | `getIntHeader(java.lang.String name)`
`java.lang.String` | `getLocalAddr()`
`java.util.Locale` | `getLocale()`
`java.util.Enumeration` | `getLocales()`
`java.lang.String` | `getLocalName()`
`int` | `getLocalPort()`
`java.lang.String` | `getMethod()`
`java.lang.Object` | `getNote(java.lang.String name)`
`java.util.Iterator` | `getNoteNames()`
`java.lang.String` | `getParameter(java.lang.String name)`
`java.util.Map` | `getParameterMap()`
`java.util.Enumeration` | `getParameterNames()`
`java.lang.String[]` | `getParameterValues(java.lang.String name)`
`java.lang.String` | `getPathInfo()`
`MessageBytes` | `getPathInfoMB()`
`java.lang.String` | `getPathTranslated()`
`java.lang.String` | `getProtocol()`
`java.lang.String` | `getQueryString()`
`java.io.BufferedReader` | `getReader()`
`java.lang.String` | `getRealPath(java.lang.String path)`
`java.lang.String` | `getRemoteAddr()`
`java.lang.String` | `getRemoteHost()`
`int` | `getRemotePort()`
`java.lang.String` | `getRemoteUser()`
`javax.servlet.ServletRequest` | `getRequest()`
`javax.servlet.RequestDispatcher` | `getRequestDispatcher(java.lang.String path)`
`java.lang.String` | `getRequestedSessionId()`
`MessageBytes` | `getRequestPathMB()`
`java.lang.String` | `getRequestURI()`
`java.lang.StringBuffer` | `getRequestURL()`
`Response` | `getResponse()`
`java.lang.String` | `getScheme()`
`java.lang.String` | `getServerName()`
`int` | `getServerPort()`
`java.lang.String` | `getServletPath()`
`MessageBytes` | `getServletPathMB()`
`javax.servlet.http.HttpSession` | `getSession()`
`javax.servlet.http.HttpSession` | `getSession(boolean create)`
`java.net.Socket` | `getSocket()`
`java.io.InputStream` | `getStream()`
`java.security.Principal` | `getUserPrincipal()`
`Wrapper` | `getWrapper()`
`boolean` | `isRequestedSessionIdFromCookie()`
`boolean` | `isRequestedSessionIdFromUrl()`
`boolean` | `isRequestedSessionIdFromURL()`
`boolean` | `isRequestedSessionIdValid()`
`boolean` | `isSecure()`
`boolean` | `isUserInRole(java.lang.String role)`
`void` | `recycle()`
`void` | `removeAttribute(java.lang.String name)`
`void` | `removeNote(java.lang.String name)`
`void` | `setAttribute(java.lang.String name, java.lang.Object value)`
`void` | `setAuthorization(java.lang.String authorization)`
`void` | `setAuthType(java.lang.String authType)`
`void` | `setCharacterEncoding(java.lang.String enc)`
`void` | `setConnector(Connector connector)`
`void` | `setContentLength(int length)`
`void` | `setContentType(java.lang.String type)`
`void` | `setContext(Context context)`
`void` | `setContextPath(java.lang.String path)`
`void` | `setDecodedRequestURI(java.lang.String uri)`
`void` | `setFilterChain(javax.servlet.FilterChain filterChain)`
`void` | `setHost(Host host)`
`void` | `setMethod(java.lang.String method)`
`void` | `setNote(java.lang.String name, java.lang.Object value)`
`void` | `setPathInfo(java.lang.String path)`
`void` | `setProtocol(java.lang.String protocol)`
`void` | `setQueryString(java.lang.String query)`
`void` | `setRemoteAddr(java.lang.String remoteAddr)`
`void` | `setRemoteHost(java.lang.String remoteHost)`
`void` | `setRequestedSessionCookie(boolean flag)`
`void` | `setRequestedSessionId(java.lang.String id)`
`void` | `setRequestedSessionURL(boolean flag)`
`void` | `setRequestURI(java.lang.String uri)`
`void` | `setResponse(Response response)`
`void` | `setScheme(java.lang.String scheme)`
`void` | `setSecure(boolean secure)`
`void` | `setServerName(java.lang.String name)`
`void` | `setServerPort(int port)`
`void` | `setServletPath(java.lang.String path)`
`void` | `setSocket(java.net.Socket socket)`
`void` | `setStream(java.io.InputStream input)`
`void` | `setUserPrincipal(java.security.Principal principal)`
`void` | `setWrapper(Wrapper wrapper)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### contextPath

    protected java.lang.String contextPath

### decodedURI

    protected java.lang.String decodedURI

### queryString

    protected java.lang.String queryString

### pathInfo

    protected java.lang.String pathInfo

### servletPath

    protected java.lang.String servletPath

### wrapper

    protected Wrapper wrapper

### filterChain

    protected javax.servlet.FilterChain filterChain

Constructor Detail

### DummyRequest

    public DummyRequest()

### DummyRequest

    public DummyRequest(java.lang.String contextPath,
                        java.lang.String decodedURI,
                        java.lang.String queryString)

Method Detail

### getContextPath

    public java.lang.String getContextPath()

  Specified by:
    `getContextPath` in interface `javax.servlet.http.HttpServletRequest`

### getContextPathMB

    public MessageBytes getContextPathMB()

### getRequest

    public javax.servlet.ServletRequest getRequest()

### getDecodedRequestURI

    public java.lang.String getDecodedRequestURI()

### getDecodedRequestURIMB

    public MessageBytes getDecodedRequestURIMB()

### getFilterChain

    public javax.servlet.FilterChain getFilterChain()

### setFilterChain

    public void setFilterChain(javax.servlet.FilterChain filterChain)

### getQueryString

    public java.lang.String getQueryString()

  Specified by:
    `getQueryString` in interface `javax.servlet.http.HttpServletRequest`

### setQueryString

    public void setQueryString(java.lang.String query)

### getPathInfo

    public java.lang.String getPathInfo()

  Specified by:
    `getPathInfo` in interface `javax.servlet.http.HttpServletRequest`

### setPathInfo

    public void setPathInfo(java.lang.String path)

### getPathInfoMB

    public MessageBytes getPathInfoMB()

### getRequestPathMB

    public MessageBytes getRequestPathMB()

### getServletPath

    public java.lang.String getServletPath()

  Specified by:
    `getServletPath` in interface `javax.servlet.http.HttpServletRequest`

### setServletPath

    public void setServletPath(java.lang.String path)

### getServletPathMB

    public MessageBytes getServletPathMB()

### getWrapper

    public Wrapper getWrapper()

### setWrapper

    public void setWrapper(Wrapper wrapper)

### getAuthorization

    public java.lang.String getAuthorization()

### setAuthorization

    public void setAuthorization(java.lang.String authorization)

### getConnector

    public Connector getConnector()

### setConnector

    public void setConnector(Connector connector)

### getContext

    public Context getContext()

### setContext

    public void setContext(Context context)

### getHost

    public Host getHost()

### setHost

    public void setHost(Host host)

### getInfo

    public java.lang.String getInfo()

### getResponse

    public Response getResponse()

### setResponse

    public void setResponse(Response response)

### getSocket

    public java.net.Socket getSocket()

### setSocket

    public void setSocket(java.net.Socket socket)

### getStream

    public java.io.InputStream getStream()

### setStream

    public void setStream(java.io.InputStream input)

### addLocale

    public void addLocale(java.util.Locale locale)

### createInputStream

    public javax.servlet.ServletInputStream createInputStream()
                                                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### finishRequest

    public void finishRequest()
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getNote

    public java.lang.Object getNote(java.lang.String name)

### getNoteNames

    public java.util.Iterator getNoteNames()

### removeNote

    public void removeNote(java.lang.String name)

### setContentType

    public void setContentType(java.lang.String type)

### setNote

    public void setNote(java.lang.String name,
                        java.lang.Object value)

### setProtocol

    public void setProtocol(java.lang.String protocol)

### setRemoteAddr

    public void setRemoteAddr(java.lang.String remoteAddr)

### setRemoteHost

    public void setRemoteHost(java.lang.String remoteHost)

### setScheme

    public void setScheme(java.lang.String scheme)

### setServerName

    public void setServerName(java.lang.String name)

### setServerPort

    public void setServerPort(int port)

### getAttribute

    public java.lang.Object getAttribute(java.lang.String name)

  Specified by:
    `getAttribute` in interface `javax.servlet.ServletRequest`

### getAttributeNames

    public java.util.Enumeration getAttributeNames()

  Specified by:
    `getAttributeNames` in interface `javax.servlet.ServletRequest`

### getCharacterEncoding

    public java.lang.String getCharacterEncoding()

  Specified by:
    `getCharacterEncoding` in interface `javax.servlet.ServletRequest`

### getContentLength

    public int getContentLength()

  Specified by:
    `getContentLength` in interface `javax.servlet.ServletRequest`

### setContentLength

    public void setContentLength(int length)

### getContentType

    public java.lang.String getContentType()

  Specified by:
    `getContentType` in interface `javax.servlet.ServletRequest`

### getInputStream

    public javax.servlet.ServletInputStream getInputStream()
                                                    throws java.io.IOException

  Specified by:
    `getInputStream` in interface `javax.servlet.ServletRequest`
  Throws:
    `java.io.IOException`

### getLocale

    public java.util.Locale getLocale()

  Specified by:
    `getLocale` in interface `javax.servlet.ServletRequest`

### getLocales

    public java.util.Enumeration getLocales()

  Specified by:
    `getLocales` in interface `javax.servlet.ServletRequest`

### getProtocol

    public java.lang.String getProtocol()

  Specified by:
    `getProtocol` in interface `javax.servlet.ServletRequest`

### getReader

    public java.io.BufferedReader getReader()
                                     throws java.io.IOException

  Specified by:
    `getReader` in interface `javax.servlet.ServletRequest`
  Throws:
    `java.io.IOException`

### getRealPath

    public java.lang.String getRealPath(java.lang.String path)

  Specified by:
    `getRealPath` in interface `javax.servlet.ServletRequest`

### getRemoteAddr

    public java.lang.String getRemoteAddr()

  Specified by:
    `getRemoteAddr` in interface `javax.servlet.ServletRequest`

### getRemoteHost

    public java.lang.String getRemoteHost()

  Specified by:
    `getRemoteHost` in interface `javax.servlet.ServletRequest`

### getScheme

    public java.lang.String getScheme()

  Specified by:
    `getScheme` in interface `javax.servlet.ServletRequest`

### getServerName

    public java.lang.String getServerName()

  Specified by:
    `getServerName` in interface `javax.servlet.ServletRequest`

### getServerPort

    public int getServerPort()

  Specified by:
    `getServerPort` in interface `javax.servlet.ServletRequest`

### isSecure

    public boolean isSecure()

  Specified by:
    `isSecure` in interface `javax.servlet.ServletRequest`

### removeAttribute

    public void removeAttribute(java.lang.String name)

  Specified by:
    `removeAttribute` in interface `javax.servlet.ServletRequest`

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Specified by:
    `setAttribute` in interface `javax.servlet.ServletRequest`

### setCharacterEncoding

    public void setCharacterEncoding(java.lang.String enc)
                              throws java.io.UnsupportedEncodingException

  Specified by:
    `setCharacterEncoding` in interface `javax.servlet.ServletRequest`
  Throws:
    `java.io.UnsupportedEncodingException`

### addCookie

    public void addCookie(javax.servlet.http.Cookie cookie)

### addHeader

    public void addHeader(java.lang.String name,
                          java.lang.String value)

### addParameter

    public void addParameter(java.lang.String name,
                             java.lang.String[] values)

### clearCookies

    public void clearCookies()

### clearHeaders

    public void clearHeaders()

### clearLocales

    public void clearLocales()

### clearParameters

    public void clearParameters()

### recycle

    public void recycle()

### setAuthType

    public void setAuthType(java.lang.String authType)

### setContextPath

    public void setContextPath(java.lang.String path)

### setMethod

    public void setMethod(java.lang.String method)

### setRequestedSessionCookie

    public void setRequestedSessionCookie(boolean flag)

### setRequestedSessionId

    public void setRequestedSessionId(java.lang.String id)

### setRequestedSessionURL

    public void setRequestedSessionURL(boolean flag)

### setRequestURI

    public void setRequestURI(java.lang.String uri)

### setSecure

    public void setSecure(boolean secure)

### setUserPrincipal

    public void setUserPrincipal(java.security.Principal principal)

### getParameter

    public java.lang.String getParameter(java.lang.String name)

  Specified by:
    `getParameter` in interface `javax.servlet.ServletRequest`

### getParameterMap

    public java.util.Map getParameterMap()

  Specified by:
    `getParameterMap` in interface `javax.servlet.ServletRequest`

### getParameterNames

    public java.util.Enumeration getParameterNames()

  Specified by:
    `getParameterNames` in interface `javax.servlet.ServletRequest`

### getParameterValues

    public java.lang.String[] getParameterValues(java.lang.String name)

  Specified by:
    `getParameterValues` in interface `javax.servlet.ServletRequest`

### getRequestDispatcher

    public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)

  Specified by:
    `getRequestDispatcher` in interface `javax.servlet.ServletRequest`

### getAuthType

    public java.lang.String getAuthType()

  Specified by:
    `getAuthType` in interface `javax.servlet.http.HttpServletRequest`

### getCookies

    public javax.servlet.http.Cookie[] getCookies()

  Specified by:
    `getCookies` in interface `javax.servlet.http.HttpServletRequest`

### getDateHeader

    public long getDateHeader(java.lang.String name)

  Specified by:
    `getDateHeader` in interface `javax.servlet.http.HttpServletRequest`

### getHeader

    public java.lang.String getHeader(java.lang.String name)

  Specified by:
    `getHeader` in interface `javax.servlet.http.HttpServletRequest`

### getHeaders

    public java.util.Enumeration getHeaders(java.lang.String name)

  Specified by:
    `getHeaders` in interface `javax.servlet.http.HttpServletRequest`

### getHeaderNames

    public java.util.Enumeration getHeaderNames()

  Specified by:
    `getHeaderNames` in interface `javax.servlet.http.HttpServletRequest`

### getIntHeader

    public int getIntHeader(java.lang.String name)

  Specified by:
    `getIntHeader` in interface `javax.servlet.http.HttpServletRequest`

### getMethod

    public java.lang.String getMethod()

  Specified by:
    `getMethod` in interface `javax.servlet.http.HttpServletRequest`

### getPathTranslated

    public java.lang.String getPathTranslated()

  Specified by:
    `getPathTranslated` in interface `javax.servlet.http.HttpServletRequest`

### getRemoteUser

    public java.lang.String getRemoteUser()

  Specified by:
    `getRemoteUser` in interface `javax.servlet.http.HttpServletRequest`

### getRequestedSessionId

    public java.lang.String getRequestedSessionId()

  Specified by:
    `getRequestedSessionId` in interface `javax.servlet.http.HttpServletRequest`

### getRequestURI

    public java.lang.String getRequestURI()

  Specified by:
    `getRequestURI` in interface `javax.servlet.http.HttpServletRequest`

### setDecodedRequestURI

    public void setDecodedRequestURI(java.lang.String uri)

### getRequestURL

    public java.lang.StringBuffer getRequestURL()

  Specified by:
    `getRequestURL` in interface `javax.servlet.http.HttpServletRequest`

### getSession

    public javax.servlet.http.HttpSession getSession()

  Specified by:
    `getSession` in interface `javax.servlet.http.HttpServletRequest`

### getSession

    public javax.servlet.http.HttpSession getSession(boolean create)

  Specified by:
    `getSession` in interface `javax.servlet.http.HttpServletRequest`

### isRequestedSessionIdFromCookie

    public boolean isRequestedSessionIdFromCookie()

  Specified by:
    `isRequestedSessionIdFromCookie` in interface `javax.servlet.http.HttpServletRequest`

### isRequestedSessionIdFromURL

    public boolean isRequestedSessionIdFromURL()

  Specified by:
    `isRequestedSessionIdFromURL` in interface `javax.servlet.http.HttpServletRequest`

### isRequestedSessionIdFromUrl

    public boolean isRequestedSessionIdFromUrl()

  Specified by:
    `isRequestedSessionIdFromUrl` in interface `javax.servlet.http.HttpServletRequest`

### isRequestedSessionIdValid

    public boolean isRequestedSessionIdValid()

  Specified by:
    `isRequestedSessionIdValid` in interface `javax.servlet.http.HttpServletRequest`

### isUserInRole

    public boolean isUserInRole(java.lang.String role)

  Specified by:
    `isUserInRole` in interface `javax.servlet.http.HttpServletRequest`

### getUserPrincipal

    public java.security.Principal getUserPrincipal()

  Specified by:
    `getUserPrincipal` in interface `javax.servlet.http.HttpServletRequest`

### getLocalAddr

    public java.lang.String getLocalAddr()

  Specified by:
    `getLocalAddr` in interface `javax.servlet.ServletRequest`

### getLocalName

    public java.lang.String getLocalName()

  Specified by:
    `getLocalName` in interface `javax.servlet.ServletRequest`

### getLocalPort

    public int getLocalPort()

  Specified by:
    `getLocalPort` in interface `javax.servlet.ServletRequest`

### getRemotePort

    public int getRemotePort()

  Specified by:
    `getRemotePort` in interface `javax.servlet.ServletRequest`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.