Create your own ActionMessages object in your Action (ActionErrors would be all but deprecated by nowexcept for the validate method).
Add ActionMessage objects to it. Call this.saveErrors(ActionMessages object) in your Action Method. Return an ActionForward to the page you want to go to. > -----Original Message----- > From: Lee Harrington [mailto:[EMAIL PROTECTED] > Sent: Monday, November 01, 2004 12:02 PM > To: Struts Users Mailing List > Subject: Handling errors in business objects > > In my Action class, I call a business object -- that does a > database action...and can return an exception. All is well, > I can trap the exception. > > However, I am at a loss as to how to handle the error from there. > Example code I've seen forwards to an error page....what I'd > like to do is load ActionError messages and return to the > calling form, just like you do if you trap the error in the > form's validate() procedure. > > Is there a way to accomplish this? Is there a reason not to? > > Lee > > --------------------------------------------------------------------- > 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]