File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes What is fundamental difference between result type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is fundamental difference between result type "chain" and result type="redirect action"" Watch "What is fundamental difference between result type "chain" and result type="redirect action"" New topic
Author

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

shukla raghav
Ranch Hand

Joined: Aug 03, 2008
Posts: 200
Please tell me the difference bw chain and redirect action? in which situation which one should be used?
Girish Wakure
Greenhorn

Joined: Apr 14, 2010
Posts: 28
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

Joined: Sep 29, 2008
Posts: 12617

"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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: What is fundamental difference between result type "chain" and result type="redirect action"
 
Similar Threads
dispatch and redirect-action
Result (dispatch) in Struts2
Forwarding data struts.xml
Tags in struts2
Error while forwarding from struts.xml