aspose file tools*
The moose likes Struts and the fly likes Different Types of Redirect techniques that are used in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Different Types of Redirect techniques that are used in Struts2" Watch "Different Types of Redirect techniques that are used in Struts2" New topic
Author

Different Types of Redirect techniques that are used in Struts2

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

I am new to Struts2 , meanwhile i am going through the concept of Redirect in Struts .
I got Confusion in understanding these two Redirect types

1.Redirect After Post

2.Redirect Action Result:

As per the definations these are for :

Redirect After Post: This is a common pattern in web application. In which an action is redirected to another action.

Redirect Action Result: The ActionMapper provided by the ActionMapperFactory is used to redirect the browser to a URL that invokes the specified action.

Can anybody please explain this .when to use the First type and Second Type .


Save India From Corruption - Anna Hazare.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

They're two completely different things.

You can use redirect-after-post to avoid a refresh trying to run the same post action again.

A "redirectAction" is a Struts 2-specific result type.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You can use redirect-after-post to avoid a refresh trying to run the same post action again.


That was a good explanation , means i think it is a PRG Pattern
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different Types of Redirect techniques that are used in Struts2
 
Similar Threads
Jsp is not displaying in Struts2
Struts2 Validation Not working
Problem of resubmisson in struts2
Struts2 - A Query about Redirect
Struts2 Interceptor Error in struts.xml file