Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Forwarding

 
Erap Estrada
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Craig Bayley
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define some forwards in struts-config.xml and use response.redirect(<path>
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic