private class TextServlet.RequestWrapper
extends HttpServletRequestWrapper
Modifier and Type | Field and Description |
---|---|
private char |
equalChar
Special code to protect equal signs in protectChars()
|
private char[] |
hexChars |
(package private) HttpServletRequest |
inReq |
(package private) ArrayList<String> |
paramNames |
(package private) HashMap<String,ArrayList<String>> |
params |
private char |
semiChar
Special code to protect semicolons in protectChars()
|
Constructor and Description |
---|
RequestWrapper(HttpServletRequest inReq) |
Modifier and Type | Method and Description |
---|---|
private void |
addParam(String name,
String val) |
String |
getParameter(String name) |
Map |
getParameterMap() |
Enumeration |
getParameterNames() |
String[] |
getParameterValues(String name) |
private void |
init() |
private boolean |
matchHex(char[] src,
int sp,
int max,
int val)
See if there's a '%XX' hex code at the given position for the value.
|
private String |
protectChars(String paramName,
String val)
Protect '=' and ';' characters that were actually escaped with % codes in
the original URL.
|
private String |
unprotectChars(String val)
Translates protected '=' and ';' characters from protectChars above
back into regular characters.
|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
HttpServletRequest inReq
ArrayList<String> paramNames
HashMap<String,ArrayList<String>> params
private char semiChar
private char equalChar
private char[] hexChars
private void init()
private String protectChars(String paramName, String val)
paramName
- Name of the parameter we're working onval
- Unescaped value to protectprivate boolean matchHex(char[] src, int sp, int max, int val)
private String unprotectChars(String val)
val
- Value possibly containing protected characters.private void addParam(String name, String val)
public Enumeration getParameterNames()
getParameterNames
in interface ServletRequest
getParameterNames
in class ServletRequestWrapper
public String getParameter(String name)
getParameter
in interface ServletRequest
getParameter
in class ServletRequestWrapper
public String[] getParameterValues(String name)
getParameterValues
in interface ServletRequest
getParameterValues
in class ServletRequestWrapper
public Map getParameterMap()
getParameterMap
in interface ServletRequest
getParameterMap
in class ServletRequestWrapper