|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.easyjf.web.ActionContext
Title:Servlet上下文件处理类
Description: 通过使用ThreadLocal变量,实现用户当前访问的Servlet上下文环境访问!
通过使用ActionContext,在用户的Action类可以访问servlet相关资源.如要访问session对象,直接使用ActionContext.getContext().getSession()即可!
Copyright: Copyright (c) 2006
Company: www.easyjf.com
| Field Summary | |
static java.lang.String |
HTTP_PARAMETERS
|
static java.lang.String |
HTTP_REQUEST
|
static java.lang.String |
HTTP_RESPONSE
|
static java.lang.String |
HTTP_SESSION
|
| Constructor Summary | |
ActionContext(java.util.Map context)
|
|
| Method Summary | |
java.lang.Object |
get(java.lang.Object key)
|
static ActionContext |
getContext()
Returns the ActionContext specific to the current thread. |
java.util.Map |
getContextMap()
|
java.util.Map |
getParameters()
|
javax.servlet.http.HttpServletRequest |
getRequest()
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
javax.servlet.http.HttpSession |
getSession()
|
void |
put(java.lang.Object key,
java.lang.Object value)
|
static void |
setContext(ActionContext context)
Sets the action context for the current thread. |
void |
setContextMap(java.util.Map contextMap)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String HTTP_REQUEST
public static final java.lang.String HTTP_RESPONSE
public static final java.lang.String HTTP_SESSION
public static final java.lang.String HTTP_PARAMETERS
| Constructor Detail |
public ActionContext(java.util.Map context)
| Method Detail |
public static void setContext(ActionContext context)
context - the action context.public static ActionContext getContext()
public void setContextMap(java.util.Map contextMap)
public java.util.Map getContextMap()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.http.HttpSession getSession()
public java.util.Map getParameters()
public java.lang.Object get(java.lang.Object key)
public void put(java.lang.Object key,
java.lang.Object value)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||