Package com.jalios.jcms.ajax
Class AjaxRequestWrapper
java.lang.Object
javax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
com.jalios.jcms.ajax.AjaxRequestWrapper
- All Implemented Interfaces:
javax.servlet.http.HttpServletRequest,javax.servlet.ServletRequest
public class AjaxRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
-
Field Summary
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
ConstructorsConstructorDescriptionAjaxRequestWrapper(javax.servlet.http.HttpServletRequest req, JcmsJspAjaxContext jjac) -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisableParameterPropagation(javax.servlet.ServletRequest request) static voidenableParameterPropagation(javax.servlet.ServletRequest request) Return the Original parameter mapRetrieve the path info of the origina unwrapped requestRetrieve the servlet path of the origina unwrapped requestgetParameter(String name) String[]getParameterValues(String name) protected booleanstatic booleanChecks if automatic propagation of request parameters from the initial request to subsequent Ajax Refresh requests is enabled (true) or disable (false).static voidrestoreDefaultParameterPropagation(javax.servlet.ServletRequest request) static voidOverrides request attributes by fake request attributesvoidstatic voiduseFakeRequest(boolean use) Activate/Desactivate use of the fake request.Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
authenticate, changeSessionId, getAuthType, getCookies, getDateHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getRemoteUser, getRequestedSessionId, getRequestURL, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgradeMethods inherited from class javax.servlet.ServletRequestWrapper
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.ServletRequest
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
-
Constructor Details
-
AjaxRequestWrapper
-
-
Method Details
-
isParametersPropagationEnabled
public static boolean isParametersPropagationEnabled()Checks if automatic propagation of request parameters from the initial request to subsequent Ajax Refresh requests is enabled (true) or disable (false).Request parameter propagation is disabled by default in JCMS 10 (since JCMS-4951).
It can be overrided through JCMS propertychannel.ajax.propagate-parameters: trueif any unexpected behavior were to occur following this change.This method and all automatic parameters propagation code will be removed in JCMS 11, unless major issue is found. cf JCMS-6097.
A restart is required if stil property is changed.
- Returns:
- true if initial parameters must be propagated to ajax request (JCMS 9 behavior), false otheriwse (JCMS 10 behavior)
- Since:
- JCMS-4951
-
getRequestURI
- Specified by:
getRequestURIin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getRequestURIin classjavax.servlet.http.HttpServletRequestWrapper
-
getContextPath
- Specified by:
getContextPathin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getContextPathin classjavax.servlet.http.HttpServletRequestWrapper
-
getPathInfo
- Specified by:
getPathInfoin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getPathInfoin classjavax.servlet.http.HttpServletRequestWrapper
-
getPathTranslated
- Specified by:
getPathTranslatedin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getPathTranslatedin classjavax.servlet.http.HttpServletRequestWrapper
-
getQueryString
- Specified by:
getQueryStringin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getQueryStringin classjavax.servlet.http.HttpServletRequestWrapper
-
getServletPath
- Specified by:
getServletPathin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getServletPathin classjavax.servlet.http.HttpServletRequestWrapper
-
getOriginalServletPath
Retrieve the servlet path of the origina unwrapped request- Returns:
- the servlet path of the origina unwrapped request
- Since:
- jcms-7.0.3
-
getOriginalPathInfo
Retrieve the path info of the origina unwrapped request- Returns:
- the path info of the origina unwrapped request
- Since:
- jcms-7.0.3
-
getLocale
- Specified by:
getLocalein interfacejavax.servlet.ServletRequest- Overrides:
getLocalein classjavax.servlet.ServletRequestWrapper
-
disableParameterPropagation
public static void disableParameterPropagation(javax.servlet.ServletRequest request) -
enableParameterPropagation
public static void enableParameterPropagation(javax.servlet.ServletRequest request) -
restoreDefaultParameterPropagation
public static void restoreDefaultParameterPropagation(javax.servlet.ServletRequest request) -
isParameterPropagationDisabled
protected boolean isParameterPropagationDisabled() -
getParameter
- Specified by:
getParameterin interfacejavax.servlet.ServletRequest- Overrides:
getParameterin classjavax.servlet.ServletRequestWrapper
-
getParameterMap
- Specified by:
getParameterMapin interfacejavax.servlet.ServletRequest- Overrides:
getParameterMapin classjavax.servlet.ServletRequestWrapper
-
getOriginalParameterMap
Return the Original parameter map- Returns:
- the parameter map of the original request
- Since:
- jcms-7.0.0
-
getParameterNames
- Specified by:
getParameterNamesin interfacejavax.servlet.ServletRequest- Overrides:
getParameterNamesin classjavax.servlet.ServletRequestWrapper
-
getParameterValues
- Specified by:
getParameterValuesin interfacejavax.servlet.ServletRequest- Overrides:
getParameterValuesin classjavax.servlet.ServletRequestWrapper
-
getHeader
- Specified by:
getHeaderin interfacejavax.servlet.http.HttpServletRequest- Overrides:
getHeaderin classjavax.servlet.http.HttpServletRequestWrapper
-
setRequestAttributes
public void setRequestAttributes() -
useFakeRequest
public static void useFakeRequest(boolean use) Activate/Desactivate use of the fake request. Fake Request must be desactivated before called by Application Server not to override the ServletPath.- Parameters:
use- the new state
-
setFakeAttributes
public static void setFakeAttributes()Overrides request attributes by fake request attributes
-