• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Different Types of Redirect techniques that are used in Struts2

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
brevity is the soul of wit - shakepeare. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic