It's not a secret anymore!*
The moose likes Struts and the fly likes Dynamic Forwarding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic Forwarding" Watch "Dynamic Forwarding" New topic
Author

Dynamic Forwarding

Erap Estrada
Ranch Hand

Joined: Nov 08, 2006
Posts: 92
Hi. I have a custom Form class that extends ValidatorForm. After a failed validation, how can I forward it dynamically. Since, the validation will not go through Action class, where can I define to which page to forward.

Dynamic link like:
/section.do?title=(var x)&txtfk=(var y)

Thanks!


SCJP with 98% by...
Craig Bayley
Ranch Hand

Joined: Sep 27, 2007
Posts: 46
Define some forwards in struts-config.xml and use response.redirect(<path>
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
hmmm...what is you are trying to do? You can define an action as your input setting and that action will get called. There is also a way to get validation to call a forward. Also, since it is on the same request cycle anything that you put on the form or in the request will still be on the request.

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Forwarding