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

What is fundamental difference between result type "chain" and result type="redirect action"

 
shukla raghav
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell me the difference bw chain and redirect action? in which situation which one should be used?
 
Girish Wakure
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In chain we get request data in next action.
While in redirect action a new request is generated. i.e. no previous request data.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Chain" should (almost) never be used. (And the only reason I say "almost" is because there might be rare occurrences where it's okay... but they're rare.)

Redirect does exactly what its name implies; it tells the client to redirect to an action. You'd use it whenever you want to redirect to an action.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic