public final class UrlRewriteHttpServletRequestAdapter
extends javax.servlet.http.HttpServletRequestWrapper
HttpServletUrlRewrite
is in use,
and the route started from came-jetty/camel-serlvet.
This adapter ensures that we can control the context-path returned from the
HttpServletRequest.getContextPath()
method.
This allows us to ensure the context-path is based on the endpoint path, as the
camel-jetty/camel-servlet server implementation uses the root ("/") context-path
for all the servlets/endpoints.Constructor and Description |
---|
UrlRewriteHttpServletRequestAdapter(javax.servlet.http.HttpServletRequest delegate,
String contextPath)
Creates this adapter
|
Modifier and Type | Method and Description |
---|---|
String |
getContextPath() |
authenticate, changeSessionId, getAuthType, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout, upgrade
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
public UrlRewriteHttpServletRequestAdapter(javax.servlet.http.HttpServletRequest delegate, String contextPath)
delegate
- the real http servlet request to delegate.contextPath
- use to override and return this context-pathpublic String getContextPath()
getContextPath
in interface javax.servlet.http.HttpServletRequest
getContextPath
in class javax.servlet.http.HttpServletRequestWrapper
Apache Camel