2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions
Class RequestWrapper

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by net.sf.basedb.clients.web.extensions.RequestWrapper
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class RequestWrapper
extends HttpServletRequestWrapper

Wrapper for HttpServletRequest that allows us to set proper servlet path and path info attributes for an extension servlet. The result should be the same as if the servlet had been mapped as a "standalone" servlet in web.xml.

Version:
2.10
Author:
nicklas
Last modified
$Date: 2009-06-15 11:05:06 +0200 (Mon, 15 Jun 2009) $

Field Summary
private  String originalServletPath
           
private  String pathInfo
           
private  String servletPath
           
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
RequestWrapper(HttpServletRequest request, String servletPath, String pathInfo)
           
 
Method Summary
 String getPathInfo()
          From the HttpServletRequestInterface ------------------------------------
 String getServletPath()
           
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
 

Field Detail

pathInfo

private final String pathInfo

servletPath

private final String servletPath

originalServletPath

private final String originalServletPath
Constructor Detail

RequestWrapper

public RequestWrapper(HttpServletRequest request,
                      String servletPath,
                      String pathInfo)
Method Detail

getPathInfo

public String getPathInfo()
From the HttpServletRequestInterface ------------------------------------

Specified by:
getPathInfo in interface HttpServletRequest
Overrides:
getPathInfo in class HttpServletRequestWrapper

getServletPath

public String getServletPath()
Specified by:
getServletPath in interface HttpServletRequest
Overrides:
getServletPath in class HttpServletRequestWrapper

2.17.2: 2011-06-17