You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2007/02/27 00:20:35 UTC
[S2] Session scoped action errors/messages
Struts1 allows action errors and messages to be saved into the session
for display after a redirect, and supports automatically clearing the
messages once they've been displayed. Does Struts2 have any support for
achieving the same thing?
ValidationAware doesn't specify any scope-aware methods (nor would it
seem appropriate for it to do do). Is there some other interface I can
implement, or interceptor I can configure, to allow messages to cross a
redirect-boundary?
For example, consider the following action:
@Result(value="success.jsp", type=ServletActionRedirect.class)
public class MyAction extends ActionSupport {
public String execute() {
addActionMessage("operation succeeded");
return SUCCESS;
}
}
If nothing like this exists already, I'll implement an interceptor but I
don't want to be re-inventing any wheels ;=)
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org