Package org.omnifaces.facesviews
Class UriExtensionRequestWrapper
- java.lang.Object
-
- jakarta.servlet.ServletRequestWrapper
-
- jakarta.servlet.http.HttpServletRequestWrapper
-
- org.omnifaces.facesviews.UriExtensionRequestWrapper
-
- All Implemented Interfaces:
HttpServletRequest
,ServletRequest
public class UriExtensionRequestWrapper extends HttpServletRequestWrapper
This wraps a request to an extensionless Faces view and provides an extension for all methods that reveal the servlet path. Additional the path info is set to null.This is needed since Faces implementations inspect the request to determine if a prefix (path) or suffix (extension) mapping was used. If the request is neither (in effect, an "exact and extensionless mapping), Faces will get confused and not be able to derive view IDs etc correctly.
For a guide on FacesViews, please see the package summary.
- Since:
- 1.4
- Author:
- Arjan Tijms
- See Also:
FacesViews
,FacesViewsForwardingFilter
-
-
Field Summary
-
Fields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
-
Constructor Summary
Constructors Constructor Description UriExtensionRequestWrapper(HttpServletRequest request, String servletPath)
Construct the URI extension request wrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpServletMapping
getHttpServletMapping()
String
getPathInfo()
String
getServletPath()
-
Methods inherited from class jakarta.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade
-
Methods inherited from class jakarta.servlet.ServletRequestWrapper
getAsyncContext, 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, startAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.servlet.ServletRequest
getAsyncContext, 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, startAsync
-
-
-
-
Constructor Detail
-
UriExtensionRequestWrapper
public UriExtensionRequestWrapper(HttpServletRequest request, String servletPath)
Construct the URI extension request wrapper.- Parameters:
request
- The request to be wrapped.servletPath
- The involved servlet path.
-
-
Method Detail
-
getServletPath
public String getServletPath()
- Specified by:
getServletPath
in interfaceHttpServletRequest
- Overrides:
getServletPath
in classHttpServletRequestWrapper
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfo
in interfaceHttpServletRequest
- Overrides:
getPathInfo
in classHttpServletRequestWrapper
-
getHttpServletMapping
public HttpServletMapping getHttpServletMapping()
- Specified by:
getHttpServletMapping
in interfaceHttpServletRequest
- Overrides:
getHttpServletMapping
in classHttpServletRequestWrapper
-
-