Thanks for your attention. Note that ActionA and ActionB are totally different classes. In this case, the 'errors' attached to request in ActionA will get lost in ActionB if the following statement is executed: // in ActionB ActionErrors errors = new ActionErrors(); ... saveErrors( request, errors );
In order that the ActionB remembers the "Afailed" error, i need functionalities like the following: In ActionB { ActionErrors errors = getErrors( request ); // This is the faked code which should have been enabled by struts errors.add(...) saveErrors( request, errors ); Unfortunately struts does not provide such functionalities, I doubt. Denis -----Original Message----- From: Jamie M. Guillemette [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 11:59 AM To: Struts Users Mailing List Subject: Re: struts: error/message handling: saveErrors we probably need to know more about your code to really answer your question. But here are few pointers. when using actionErrors. note that many functions return boolean by returning actionErrors.isEmpty(); in these cases if an error was found.. it will not bother to process the other errors.. ( cause lets face it .. the first error may be the only reason the next error was caused.... ) if you are using the validate() method. you can achieve this by simply adding new errors prior to returning. JMG ----- Original Message ----- From: "Denis Wang" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, July 03, 2003 11:48 AM Subject: struts: error/message handling: saveErrors > Hello, all, > > I have the following problem: > In ActionA{ > .... > ActionErrors errors = new ActionErrors(); > errors.add( ActionErrors.GLOBAL_ERROR, new ActionError( > "Afailed" ) ); > saveErrors( request, errors ); > } > > In ActionB{ > .... > ActionErrors errors = new ActionErrors(); > errors.add( ActionErrors.GLOBAL_ERROR, new ActionError( > "Bfailed" ) ); > saveErrors( request, errors ); > } > > When ActionA returns it will forward the processing to ActionB and then the > "Bfailed" error will override the "Afailed" error. > > How can I show both "Afailed" and "Bfailed" error messages? Thanks a lot! > Denis > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]