public AttributeNamesEnumerator() { int last = -1; parentEnumeration = getRequest().getAttributeNames(); for (int i = specialAttributes.length - 1; i >= 0; i--) { if (getAttribute(specials[i]) != null) { last = i; break; } } this.last = last; }
/** * Override the <code>getPathTranslated()</code> method of the wrapped * request. */ @Override public String getPathTranslated() { if (getPathInfo() == null || getServletContext() == null) { return null; } return getServletContext().getRealPath(getPathInfo()); }
/** * Return the session associated with this Request, creating one * if necessary. */ @Override public HttpSession getSession() { return getSession(true); }
/** * Override the <code>removeAttribute()</code> method of the * wrapped request. * * @param name Name of the attribute to remove */ @Override public void removeAttribute(String name) { if (!removeSpecial(name)) getRequest().removeAttribute(name); }
(String) getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH); if (servletPath == null) servletPath = getServletPath(); String pathInfo = getPathInfo(); String requestPath = null;
/** * Parses the parameters of this request. * * If parameters are present in both the query string and the request * content, they are merged. */ void parseParameters() { if (parsedParams) { return; } parameters = new HashMap<>(); parameters = copyMap(getRequest().getParameterMap()); mergeParameters(); parsedParams = true; }
/** * Merge the parameters from the saved query parameter string (if any), and * the parameters already present on this request (if any), such that the * parameter values from the query string show up first if there are * duplicate parameter names. */ private void mergeParameters() { if ((queryParamString == null) || (queryParamString.length() < 1)) return; HashMap<String, String[]> queryParameters = new HashMap<>(); String encoding = getCharacterEncoding(); if (encoding == null) encoding = "ISO-8859-1"; RequestUtil.parseParameters(queryParameters, queryParamString, encoding); Iterator<String> keys = parameters.keySet().iterator(); while (keys.hasNext()) { String key = keys.next(); Object value = queryParameters.get(key); if (value == null) { queryParameters.put(key, parameters.get(key)); continue; } queryParameters.put (key, mergeValues(value, parameters.get(key))); } parameters = queryParameters; }
String requestedSessionId = getRequestedSessionId(); if (requestedSessionId == null) return false;
wrapper = new ApplicationHttpRequest (hcurrent, context, crossContext); } else {
protected String findNext() { String result = null; while ((result == null) && (parentEnumeration.hasMoreElements())) { String current = parentEnumeration.nextElement(); if (!isSpecial(current)) { result = current; } } return result; }
/** * Parses the parameters of this request. * * If parameters are present in both the query string and the request * content, they are merged. */ void parseParameters() { if (parsedParams) { return; } parameters = new ParameterMap<>(); parameters.putAll(getRequest().getParameterMap()); mergeParameters(); ((ParameterMap<String,String[]>) parameters).setLocked(true); parsedParams = true; }
public AttributeNamesEnumerator() { parentEnumeration = getRequest().getAttributeNames(); if (specialAttributes != null) { specialNames = specialAttributes.keySet().iterator(); } }
@SuppressWarnings("unchecked") private Map<String, String> getSessionVersions() { return (Map<String, String>) getAttribute( Globals.SESSION_VERSIONS_REQUEST_ATTRIBUTE); }
(String) getAttribute(Globals.INCLUDE_SERVLET_PATH_ATTR); if (servletPath == null) servletPath = getServletPath(); String pathInfo = getPathInfo(); String requestPath = null;
/** * Parses the parameters of this request. * * If parameters are present in both the query string and the request * content, they are merged. */ void parseParameters() { if (parsedParams) { return; } parameters = new HashMap(); parameters = copyMap(getRequest().getParameterMap()); mergeParameters(); parsedParams = true; }
/** * Merge the parameters from the saved query parameter string (if any), and * the parameters already present on this request (if any), such that the * parameter values from the query string show up first if there are * duplicate parameter names. */ private void mergeParameters() { if ((queryParamString == null) || (queryParamString.length() < 1)) return; HashMap<String, String[]> queryParameters = new HashMap<String, String[]>(); String encoding = getCharacterEncoding(); if (encoding == null) encoding = "ISO-8859-1"; RequestUtil.parseParameters(queryParameters, queryParamString, encoding); Iterator<String> keys = parameters.keySet().iterator(); while (keys.hasNext()) { String key = keys.next(); Object value = queryParameters.get(key); if (value == null) { queryParameters.put(key, parameters.get(key)); continue; } queryParameters.put (key, mergeValues(value, parameters.get(key))); } parameters = queryParameters; }
String requestedSessionId = getRequestedSessionId(); if (requestedSessionId == null) return (false);
wrapper = new ApplicationHttpRequest (hcurrent, context, crossContext); } else {
protected String findNext() { String result = null; while ((result == null) && (parentEnumeration.hasMoreElements())) { String current = parentEnumeration.nextElement(); if (!isSpecial(current)) { result = current; } } return result; }
/** * Parses the parameters of this request. * * If parameters are present in both the query string and the request * content, they are merged. */ void parseParameters() { if (parsedParams) { return; } parameters = new ParameterMap<>(); parameters.putAll(getRequest().getParameterMap()); mergeParameters(); ((ParameterMap<String,String[]>) parameters).setLocked(true); parsedParams = true; }