Stripes

RedirectResolution: Add support for permanent redirects

Details

Description

Allow the redirect resolution to perform permanent redirects. Currently, only temporary redirects are supported. And while it is possible to extend RedirectResolution, the entire execute method must be overridden because of the response.sendRedirect at the end of the method. Extending subsequently requires duplicating a lot of logic.

This issue is based on the following conversation: http://thread.gmane.org/gmane.comp.java.stripes.user/10378/focus=10384

Activity

Hide
Roger Bystrøm added a comment - 14/Jun/10 5:48 AM

Until it's resolved, here's a workaround for those interested:
http://pastebin.com/dxfEguUt

Show
Roger Bystrøm added a comment - 14/Jun/10 5:48 AM Until it's resolved, here's a workaround for those interested: http://pastebin.com/dxfEguUt
Hide
Scott Archer added a comment - 12/Nov/10 4:26 PM

Would it be better to allow the programmer to set an optional Redirect Type int on the RedirectResolution so we could support the different types rather than only adding support for Permanent Redirects?

Show
Scott Archer added a comment - 12/Nov/10 4:26 PM Would it be better to allow the programmer to set an optional Redirect Type int on the RedirectResolution so we could support the different types rather than only adding support for Permanent Redirects?
Hide
Scott Archer added a comment - 03/Dec/10 10:38 AM

I updated the RedirectResolution based on Roger Bystrøm's workaround.
RedirectResolution now supports a setPermanent(true) method. If you call setPermanent(true) the a 301 Permanent redirect will be used insead of the 302 Temporary redirect.

Show
Scott Archer added a comment - 03/Dec/10 10:38 AM I updated the RedirectResolution based on Roger Bystrøm's workaround. RedirectResolution now supports a setPermanent(true) method. If you call setPermanent(true) the a 301 Permanent redirect will be used insead of the 302 Temporary redirect.

People

Vote (0)
Watch (1)

Dates

  • Created:
    28/May/10 1:54 PM
    Updated:
    03/Dec/10 10:38 AM
    Resolved:
    03/Dec/10 10:38 AM