public abstract class AbstractBaseControl extends Object
| 构造器和说明 |
|---|
AbstractBaseControl() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
getAttribute(String name) |
protected String |
getCookieValue(String name) |
protected String |
getHeader(String name) |
static String |
getIpAddress(javax.servlet.http.HttpServletRequest request)
获取ip 地址
|
protected <T> T |
getObject(Class<T> tClass)
获取表单数据到实体中
|
protected String |
getParameter(String name) |
protected String |
getParameter(String name,
String def) |
protected int |
getParameterInt(String name) |
protected int |
getParameterInt(String name,
int def) |
protected String[] |
getParameters(String name) |
protected Map<String,String> |
getRefererParameter()
获取来源的url 参数
|
javax.servlet.http.HttpServletRequest |
getRequest() |
javax.servlet.http.HttpServletResponse |
getResponse() |
javax.servlet.http.HttpSession |
getSession() |
protected String |
getSessionAttribute(String name)
获取session 字符串
|
void |
reLoad() |
protected void |
removeSessionAttribute(String name)
移除session 值
|
protected void |
setAttribute(String name,
Object object) |
void |
setReqAndRes(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletResponse response)
拦截器注入
|
protected void |
setSessionAttribute(String name,
Object object)
设置session 字符串
|
protected String ip
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpServletRequest getRequest()
public void setReqAndRes(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletResponse response)
request - reqsession - sesresponse - reppublic void reLoad()
protected String getSessionAttribute(String name)
name - nameprotected void removeSessionAttribute(String name)
name - nameprotected void setSessionAttribute(String name, Object object)
name - nameobject - 值protected int getParameterInt(String name, int def)
protected int getParameterInt(String name)
protected Map<String,String> getRefererParameter() throws UnsupportedEncodingException
UnsupportedEncodingException - 编码异常protected <T> T getObject(Class<T> tClass) throws IllegalAccessException, InstantiationException
T - ttClass - classIllegalAccessException - yInstantiationException - ypublic static String getIpAddress(javax.servlet.http.HttpServletRequest request)
request - reqCopyright © 2018 Pivotal Software, Inc.. All rights reserved.