Hm, I already thought about that. But I miss the link between the old mounted
pages and the new pages. I mean I have to mount a pair of page classes
though.

mountPage("product.html", LegacyProductPage.class);
mountPage("product/#{product_name}/${product}", ProductPage.class)

And in the new Mapper would check like (don't know whether this works):

@Override
public final IRequestHandler mapRequest(Request request)
{
   IRequestHandler handler = delegate.mapRequest(request);
   // check whether the request is a legacy URL
   if (isLegacyUrl(request)
  {
      // get the new URL instead
      String url = createRedirectUrl(handler, request);
      handler = createRedirectHandler(url);
   }
   return handler 
}

Just what I have in mind. The new mapper would hold a map with a pair of
"legacy" and "new" Page classes. And for each request the mapper would check
whether this request URL is contained in the map. But this means I have to
maintain two places for each pair of "legacy" and "new" Page classes. I'm
not sure whether this is a smart solution. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Redirect-to-Wicket-page-with-301-Moved-Permanently-tp4631888p4655465.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

Reply via email to