You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Method A:
ActionContext.getContext().getSession() (returns Map, works internally using a ThreadLocal)

Method B (Recommended):
Have the action implements SessionAware, and the Session (as a Map) will be set through the setSession(Map) method. This requires that the 'servlet-config' interceptor being included when the particular action is processed.

@see action-default.xml
@see com.opensymphony.webwork.interceptor.SessionAware
@see com.opensymphony.webwork.interceptor.Servlet Config Interceptor

  • No labels