Dashboard > WebWork > ... > FAQ > How can I get the HttpServletRequest
  WebWork Log In View a printable version of the current page.  
  How can I get the HttpServletRequest
Added by Onyeje Bose, last edited by Rene Gielen on Nov 09, 2005  (view change)
Labels: 
(None)

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

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators