On Fri, 20 Aug 2004 17:19:24 +0200, Axel Seinsche <[EMAIL PROTECTED]> wrote: > Bill Siggelkow schrieb: > > > I don't understand exactly why you are doing the redirect? Why not > > just set the input attribute to be the page you are redirecting to ... > > then Struts will forward to it when validation fails. > > > Can I set the input attribute in my Java Code? I thought I have to > define it in the struts-config.xml. But at design time it's not yet > defined to which page the application should forward to. Is it possible > to use mapping.setInput(myForward)? That would be too easy. ;-) > > TIA, Axel >
Well, not really set the input, but you can direct the request to the correct one in your java code. First off, set validate=false on the action. Then, in your action, call the form's validate() yourself. Lastly, if there are validation errors, call saveErrors() to save the error messages then forward the request to the correct input form. Hubert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]