> In the validate method of my actionForm I am using the Jakarta regular
> expression api to validate user input.
> 
> In the method I use a try catch block when creating a RE (regular expression
> pattern) object. In the event an exception is thrown the catch block will
> catch the exception-- but how do I propagate the exception out to the action
> where I can forward to an appropriate error page.  Or am I going at this all
> wrong.
> 
> Thanks for your help.

You need to populate and return an ActionErrors object with one or more
error messages relevant to the exception that is thrown. Provided you have
set up the page correctly the user will be redirected back to the form and
the error message(s) displayed in place of the <html:errors/> tag.

Ben Starr


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

Reply via email to