Hi,

I have a CMS-system that under some circumstances should do an immediate redirect when the session is created. I try with the following code in MySession's constructor:

String host = ((ServletWebRequest) 
request).getHttpServletRequest().getHeader("host");
Instance instance = instanceDao.findByHostname(host);

if(!Strings.isEmpty(instance.getHost().getRedirectToHost())) {
        String redirectUrl = instance.getHost().getRedirectToHost();
        
        if(instance.getHost().getKeepParamsOnRedirect())
                redirectUrl = redirectUrl + "/" + request.getPath();

        RequestCycle.get().setRedirect(true);
        RequestCycle.get().setRequestTarget(new 
RedirectRequestTarget(redirectUrl));
                        
        return;
}

After this is run, I would like Wicket to just do the redirect, but instead it goes through the authorizationStrategy and returns the page that my RequestCycleProcessor picks out.

Is there a way to do an _immediate_ redirect, or discard the page that my 
RequestCycleProcessor has already picked out?

-- Edvin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to