Hi Dan,

I'd recommend to revert your changes.
Wicket by default uses render strategy which involves http redirects
which has to be temporary. With your change you will always use
permanent redirects and this may cause some problems. For example you
may skip the ACTION phase of the processing and go directly to RENDER
phase just because the action url is already marked as permanently
moved.

Read the javadoc of
org.apache.wicket.settings.IRequestCycleSettings.RenderStrategy for
more info.

On Sat, Oct 27, 2012 at 3:47 PM, Dan <dan.traczyn...@gmail.com> wrote:
> I know this is a bit late to reply, but I just had this same problem and I
> was unable to find a solution posted anywhere.
>
> I was able to solve the problem and change the redirect behaviour to always
> use 301 instead of 302 by subclassing Wicket's
> org.apache.wicket.protocol.http.servlet.ServletWebResponse class and
> overriding the sendRedirect method to use my own custom logic instead of the
> HttpServletResponse.sendRedirect logic.
>
> I wrote it up here:
> http://pushinginertia.com/2012/10/wicket-redirect-301-moved-permanently-302-found/
>
> Perhaps we can make the change I outlined directly in wicket-core and then
> make it configurable so that the web application can default to a 301 or 302
> redirect, based on the requirements of each web application.
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4653406.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to