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

Compare with Current View Page History

« Previous Version 2 Next »

Method A:
ServletActionContext.getRequest() (works internally using a ThreadLocal)

Method B:
Have the action implements ServletRequestAware and the servlet request will be set through setServletRequest(HttpServletRequest) method. This requires the action to have a 'servlet-config' interceptor added.

@see webwork-default.xml
@see com.opensymphony.webwork.interceptor.ServletRequestAware
@see com.opensymphony.webwork.interceptor.ServletConfigInterceptor

  • No labels