You can obtain the request by asking the ActionContext or implementing ServletResponseAware. Implementing ServletResponseAware is preferred.

Ask the ActionContext

The response is available on the ActionContext instance, which is made available via ThreadLocal.

HttpServletResponse response = ServletActionContext.getResponse();

Implement ServletResponseAware

(star) Preferred