I fell into that same trap once. Although it does it good job in
teaching a lesson about not just copying & pasting code from a web
page, it would really be nice if someone could correct the incorrect
code samples on

http://tapestry.apache.org/tapestry5/guide/secure.html

Samples (plural) because it seems the snippets above the one with the
mixed up ports also don't work anymore, I think it has to be
configuration.add instead of configuration.put.

Lutz



On Fri, Aug 8, 2008 at 4:34 AM, tapestry5 <[EMAIL PROTECTED]> wrote:
>
> It should not be
>
> String protocol = secure ? "https" : "http";
> int port = secure ? 8080 : 8443;
>
> but
>
> String protocol = secure ? "https" : "http";
> int port = secure ? 8443 : 8080;
>
>
>
>
> Argo Vilberg wrote:
>>
>> hi,
>>
>>
>> I have one page with http protocol and pagelink in it.
>> Pagelink points https @secure page.
>>
>> But problem is that pagelink generate https://localhost/digi/newpage link,
>> and not with alias localhost:8443.
>>
>> http page is in port 8080, but pagelink do not understand that https port
>> is
>> 8443.
>>
>> I also tried do add
>>     public void contributeAlias(Configuration<AliasContribution>
>> configuration)
>>        {
>>                BaseURLSource source = new BaseURLSource()
>>                {
>>                       public String getBaseURL(boolean secure)
>>                     {
>>                         String protocol = secure ? "https" : "http";
>>
>>                         int port = secure ? 8080 : 8443;
>>
>>                         return String.format("%s://localhost:%d",
>> protocol,
>> port);
>>                     }
>>             };
>>
>> configuration.add(AliasContribution.create(BaseURLSource.class,source));
>>
>>        }
>>
>>
>> in AppModule.java
>>
>> But this does not help.
>>
>> Any ideas?
>>
>> Argo
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/T5-pagelink-and-http---%3Ehttps-redirect-tp18873545p18884134.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to