public class SHForceHttpServletRequest
extends javax.servlet.http.HttpServletRequestWrapper
Title: 信息化平台 - 实现了HttpServletRequest接口, 主要目的是为了解决URL汉字乱码的问题, 但目前在struts1中用了filter来进行编码,故暂没用,留着为了今后扩展
Description: 基础类库,适合Struts结构体系
Company:首亨软件(重庆)有限公司
Author:江兴春
构造器和说明 |
---|
SHForceHttpServletRequest(javax.servlet.http.HttpServletRequest request)
构造函数
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getParameter(java.lang.String name)
Returns the value of a request parameter as a
String ,
or null if the parameter does not exist. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns an array of
String objects containing
all of the values the given request parameter has, or
null if the parameter does not exist. |
authenticate, changeSessionId, getAuthType, getContextPath, 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, getParameterMap, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameterMap, getParameterNames, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
public SHForceHttpServletRequest(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest HttpServletRequest对象public java.lang.String[] getParameterValues(java.lang.String name)
String
objects containing
all of the values the given request parameter has, or
null
if the parameter does not exist.
If the parameter has a single value, the array has a length of 1.
getParameterValues
在接口中 javax.servlet.ServletRequest
getParameterValues
在类中 javax.servlet.ServletRequestWrapper
name
- a String
containing the name of
the parameter whose value is requestedString
objects
containing the parameter's valuesgetParameter(java.lang.String)
public java.lang.String getParameter(java.lang.String name)
String
,
or null
if the parameter does not exist. Request parameters
are extra information sent with the request. For HTTP servlets,
parameters are contained in the query string or posted form data.
You should only use this method when you are sure the
parameter has only one value. If the parameter might have
more than one value, use getParameterValues(java.lang.String)
.
If you use this method with a multivalued
parameter, the value returned is equal to the first value
in the array returned by getParameterValues
.
If the parameter data was sent in the request body, such as occurs
with an HTTP POST request, then reading the body directly via ServletRequestWrapper.getInputStream()
or ServletRequestWrapper.getReader()
can interfere
with the execution of this method.
getParameter
在接口中 javax.servlet.ServletRequest
getParameter
在类中 javax.servlet.ServletRequestWrapper
name
- a String
specifying the
name of the parameterString
representing the
single value of the parametergetParameterValues(java.lang.String)