Basically, you need to make your action class implement two interfaces-- ServletRequestAware, ServletResponseAware, add an HttpServletRequest and HttpServletResponse object, then implement the necessary getters and setters for each.
See full code:
http://www.roseindia.net/struts/struts2/strutsresources/access-request-response.shtml
No comments:
Post a Comment