Re: Struts 2 question about validation and forwarding

2009-03-02 Thread Dave Newton
laredotornado wrote: I only want to forward if validation fails -- i.e. don't need to run the "execute" method. But I don't know how to set that up in my struts-config.xml file (or some other file if that's what's needed). How do I do that? IIRC execute isn't executed on a validation failure;

Re: Struts 2 question about validation and forwarding

2009-03-02 Thread laredotornado
Hi, I only want to forward if validation fails -- i.e. don't need to run the "execute" method. But I don't know how to set that up in my struts-config.xml file (or some other file if that's what's needed). How do I do that? Or is the only way to do this is as David Newton suggested -- moving v

Re: Struts 2 question about validation and forwarding

2009-02-27 Thread Dave Newton
laredotornado wrote: But it seems like the "ActionErrors validate" method from my ActionForm class is called, fails, and my execute handler is not called. Is there a way in the struts-config.xml file that I can set up a foward upon validation failure? This is what my struts action is currently

Re: Struts 2 question about validation and forwarding

2009-02-27 Thread Burton Rhodes
Exactly. If validation fails, execute will not be called by design. Since all you want to do is forward, you shouldn't need to run your execute method. The forwarding will take place in your struts.xml file as previously suggested. If you need to execute code regardless of the validation, look int

Re: Struts 2 question about validation and forwarding

2009-02-27 Thread laredotornado
But it seems like the "ActionErrors validate" method from my ActionForm class is called, fails, and my execute handler is not called. Is there a way in the struts-config.xml file that I can set up a foward upon validation failure? This is what my struts action is currently ...

Re: Struts 2 question about validation and forwarding

2009-02-27 Thread Jim Kiley
Just have the result of the input() method return them to a different page under that condition. On Fri, Feb 27, 2009 at 12:41 PM, laredotornado wrote: > > Hi, > > If request validation fails, how can I forward the user to a different page > than that from which they came? The scenario is that a