Tuesday, July 21, 2009

Unable to find request attributes on forward in struts

Cant find the request attributes after a forward from an Action(in struts app)? after hours of debugging and several minutes of googling the solution turns out to be simple. If you want your request attributes to be present in the request object after the forward you must set redirect="false" since redirect="true" will entail that the request (HttpServletRequest object) is flushed out on which the attributes are saved. So no wonder u are unable to get
the request attributes.

No comments: