Re: HttpsRequestCycleProcessor not immediately redirecting to https

2010-03-18 Thread Igor Vaynberg
why dont you continue this in the original thread. that way the
knowledge will not be spread all over.

-igor

On Thu, Mar 18, 2010 at 1:29 AM, Gianni  wrote:
> Apologies, I now see it's exactly the same problem as described here:
> http://old.nabble.com/%40RequireHttps---forms-misbehaving-ts26845496.html
>
> I can reproduce this in a quickstart, I just want to check before creating a 
> jira:
> - In my quickstart I'm calling setRedirect(true) within the form submit 
> button's onSubmit(), is this the correct place to force a redirect?
> - SignInPage has the @RequireHttps annotation, *should* the code below result 
> in immediate redirection to the https page or am I missing something?
>
> Button submitButton = new Button("submit") {
>       �...@override
>        public void onSubmit() {
>                setRedirect(true);
>                setResponsePage(new SignInPage());
>        }
> };
>
> -Gianni
>
>
> On 17/mar/2010, at 10.13, Gianni wrote:
>
>> 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
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: HttpsRequestCycleProcessor not immediately redirecting to https

2010-03-18 Thread Gianni
Apologies, I now see it's exactly the same problem as described here:
http://old.nabble.com/%40RequireHttps---forms-misbehaving-ts26845496.html

I can reproduce this in a quickstart, I just want to check before creating a 
jira:
- In my quickstart I'm calling setRedirect(true) within the form submit 
button's onSubmit(), is this the correct place to force a redirect?
- SignInPage has the @RequireHttps annotation, *should* the code below result 
in immediate redirection to the https page or am I missing something?

Button submitButton = new Button("submit") {
@Override
public void onSubmit() {
setRedirect(true);
setResponsePage(new SignInPage());
}
};

-Gianni


On 17/mar/2010, at 10.13, Gianni wrote:

> 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
> 


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