You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mi...@ps.ge.com on 2003/04/22 00:48:48 UTC
ActionErrors - how to use it?
Hello,
how I can pass ActionErrors from one action to another one?
can I read it from request?
like that in some action:
ActionErrors errors;
errors = (ActionErrors) request.getAttribute(Globals.ERROR_KEY);
if (null == errors){
errors = new ActionErrors();
}
then in some catch block:
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("error.theError"));
saveErrors(request, errors);
I tried it and it works.
Q. is - is it right way to do it?
tnx
Best Regards.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org