As part of a product purchase workflow I require users to sign-in or register a 
new account in order to continue.
In my purchase page I'm checking if the user is already signed-in and if not I 
send them to a SignInOrRegisterPage which has the @RequireHttps annotation.

BookingPage dest = new BookingPage(product);
if (signedIn) {
        setResponsePage(dest);
} else {
        session.getDefaultPageMap().put(dest);
        PageReference destPageRef = dest.getPageReference();
        setResponsePage(new SignInOrRegisterPage(destPageRef));
}

@RequireHttps
public class SignInOrRegisterPage extends StandardBasePage {
    private PageReference destination;

    public SignInOrRegisterPage(PageReference finalDest) {
..........

In MyApplication:
@Override
    protected IRequestCycleProcessor newRequestCycleProcessor() {
        HttpsConfig config = new HttpsConfig(MyApplication.get().getHttpPort(), 
MyApplication.get().getHttpsPort());
        return new HttpsRequestCycleProcessor(config) {
            @Override
            protected IRequestCodingStrategy newRequestCodingStrategy() {
                return new CryptedUrlWebRequestCodingStrategy(new 
WebRequestCodingStrategy());
            }
        };
    }


The initial redirection to SignInOrRegisterPage does not go to https, only when 
I submit the form on the http SignInOrRegisterPage does it then redirect to 
https.
Any ideas why it's not going immediately to https?
Thanks
Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to