> What I would like to do is that if there is some type
> of error in this
> method, I want to be able to do a
> mapping.findForward("failure") and at the
> same time be able to include some type of error
> message to the user in the
> failure page. My failure page is probably the same
> form the user filled out,
> but the second time around I would like to display
> the error message.

This is what ActionError, ActionErrors and <html:errors/> is for. 

perform(...)
{
   // ... processing ...
   ActionErrors errors = new ActionErrors();
   ActionError err = new ActionError("error.username.taken");
   errors.add(ActionErrors.GLOBAL_ERROR, err);

   saveErrors(request, response);

   return new ActionForward(mapping.getInput());
}

Then in the jsp page, you can simply add:

<html:errors/>

somewhere conspicuous to get the errors to display.

Joey

--
Sent via jApache.org

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to