Hi,
Don't know about a "best" practice but what comes to me is to implement
continue... yourself:

        static void continueToOriginalDestination()
        {
                InterceptData data = InterceptData.get();
                if (data != null)
                {
                        data.continueOk = true;
                        String url =
RequestCycle.get().getUrlRenderer().renderUrl(data.originalUrl);
//                      RequestCycle.get().replaceAllRequestHandlers(new
RedirectRequestHandler(url)); --commented this
and use different request handler
                        RequestCycle.get().replaceAllRequestHandlers(new
RedirectWithCookieRequestHandler(url));

                }
        }

public class RedirectWithCookieRequestHandler extends RedirectRequestHandler
{

    private Cookie rememberMeCookie;
....


    @Override
    public void respond(IRequestCycle requestCycle) {
        HttpServletRequest request = ((ServletWebRequest)
requestCycle.getRequest()).
                getContainerRequest();

        StringBuilder builder = new StringBuilder();

//generic set cookie code:
       
builder.append(cookie.getName()).append("=").append(cookie.getValue());
        builder.append(";Path=").append(cookie.getPath());
        builder.append("; HttpOnly");

        if (cookie.getSecure()) {
            builder.append("; Secure");
        }

        response.setHeader("SET-COOKIE", builder.toString());

        super.respond(requestCycle);
    }
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/redirectToInterceptPage-continueToOriginalDestination-and-cookies-tp4662074p4662085.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