Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 webwork-default.xml
@see com.opensymphony.webwork.interceptor.ServletConfigInterceptor