|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
org.hippoecm.hst.util.GenericHttpServletRequestWrapper
org.hippoecm.hst.container.HstContainerRequestImpl
public class HstContainerRequestImpl
The HstContainerRequestImpl
is a wrapper around the GenericHttpServletRequestWrapper
. As the HstRequestProcessor
is invoked from a Filter
, the original HttpServletRequest
does return an empty HttpServletRequest.getPathInfo()
.
However, in the context of HstRequestProcessor
, the HttpServletRequest.getServletPath()
is equivalent to ResolvedMount.getResolvedMountPath()
and the HttpServletRequest.getPathInfo()
equivalent to the HttpServletRequest.getRequestURI()
after the HttpServletRequest.getServletPath()
(and the same for HttpServletRequest.getPathTranslated()
only then not decoded.).
Therefore, this HstContainerRequestImpl
object has a setter setServletPath(String)
, that recomputes the getPathInfo()
. When the constructor
is called, the servletPath
is set to an empty String
(""). After for example a ResolvedMount
is found, the setServletPath(String)
can be
called to recompute/reset the servletPath
and pathInfo
(and pathTranslated
)
The getPathInfo()
won't return the part in the GenericHttpServletRequestWrapper.getRequestURI()
after the pathSuffixDelimiter
.
The delimiter itself won't be part of the getPathInfo()
either.
Also the return won't include any matrix parameters.
Field Summary |
---|
Fields inherited from class org.hippoecm.hst.util.GenericHttpServletRequestWrapper |
---|
contextPath, pathInfo, pathTranslated, requestURI, requestURL, servletPath |
Fields inherited from interface javax.servlet.http.HttpServletRequest |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
HstContainerRequestImpl(javax.servlet.http.HttpServletRequest request,
String pathSuffixDelimiter)
Creates a wrapper HttpServletRequest with a HttpServletRequest.getServletPath() that is an empty String (""). |
Method Summary | |
---|---|
String |
getPathInfo()
|
String |
getPathSuffix()
Returns path suffix splitted from the request URI by the specified path suffix delimiter. |
String |
getPathTranslated()
|
StringBuffer |
getRequestURL()
|
void |
setServletPath(String servletPath)
Sets a new servletPath on the HttpServletRequest . |
Methods inherited from class org.hippoecm.hst.util.GenericHttpServletRequestWrapper |
---|
getContextPath, getRequestURI, getServletPath, setContextPath, setPathInfo, setPathTranslated, setRequestURI, setRequestURL |
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper |
---|
getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getQueryString, getRemoteUser, getRequestedSessionId, 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.http.HttpServletRequest |
---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
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 |
Constructor Detail |
---|
public HstContainerRequestImpl(javax.servlet.http.HttpServletRequest request, String pathSuffixDelimiter)
HttpServletRequest
with a HttpServletRequest.getServletPath()
that is an empty String
(""). The
HttpServletRequest.getPathInfo()
will be the part of the HttpServletRequest.getRequestURI()
after the HttpServletRequest.getContextPath()
and before the getPathSuffix()
and before the #MATRIX_PARAMETERS_DELIMITER
request
- pathSuffixDelimiter
- Method Detail |
---|
public String getPathSuffix()
HstContainerRequest
getPathSuffix
in interface HstContainerRequest
public StringBuffer getRequestURL()
getRequestURL
in interface javax.servlet.http.HttpServletRequest
getRequestURL
in class GenericHttpServletRequestWrapper
public void setServletPath(String servletPath)
Sets a new servletPath
on the HttpServletRequest
. For an HstRequest
, the servletPath
becomes the ResolvedMount.getResolvedMountPath()
of
the ResolvedMount
belonging to the HstRequestContext
.
When the ResolvedMount.getMount()
returns a 'root' Mount
, the servletPath
is an empty string (""). Otherwise, it always starts with a slash "/".
setServletPath
in class GenericHttpServletRequestWrapper
servletPath
- ResolvedMount.getResolvedMountPath()
public String getPathInfo()
getPathInfo
in interface javax.servlet.http.HttpServletRequest
getPathInfo
in class GenericHttpServletRequestWrapper
public String getPathTranslated()
getPathTranslated
in interface javax.servlet.http.HttpServletRequest
getPathTranslated
in class GenericHttpServletRequestWrapper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |