You could also change the default HTTPS port in your app server
configuration, and then your don't have to worry about modifying the
URIs.  The default is of course 443.

"The https:// protocol can be used in exactly the same way as the
http:// protocol.
The differences are that HTTPS uses a default port number of 443 (80
for HTTP) and that
HTTPS automatically performs SSL negotiation and thus always sends
data in encrypted form,
i.e. web servers accessed through https:// have to be "secure web servers"."

For me, my development is always HTTP, and the deployed is always
using HTTPS (for everything)
So in the module that contributes these settings (for most people
that's the AppModule), I look up a value stored in the local JNDI
which tells me if I should use https or not

public void contributeMetaDataLocator(MappedConfiguration<String,String>
configuration)
{
  if(thisIsDeploymentServer())
  {
    configuration.put(TapestryConstants.SECURE_PAGE, "true");
  }
}

On Tue, Aug 5, 2008 at 11:35 PM, tapestry5 <[EMAIL PROTECTED]> wrote:
>
> I have the same issue. I tried using it.
> It won't open the landing page. Infact if i don't put @Secure and also donot
> contribute it opens the landing page as https and further the links were
> http.
>
> Even if i make it work but still contributeAlias is good for testing but not
> for production.
>
> Is there any other way to get https and not http.
>
> As my page can be used for http and https. So if i put @Secure then it won't
> work for any http call.
>
>
>
> 9902468 wrote:
> >
> > Hi,
> >
> > Use @Secure annotation and add this to your appmodule: (Also use whatever
> > ports you wish.)
> >
> > public void contributeAlias(Configuration<AliasContribution>
> > configuration)
> >     {
> >         BaseURLSource source = new BaseURLSource()
> >         {
> >             public String getBaseURL(boolean secure)
> >             {
> >                 String protocol = secure ? "https" : "http";
> >
> >                 int port = secure ? 443 : 80;
> >
> >                 if(port == 80 || port == 443){
> >                     return String.format("%s://localhost", protocol);
> >                 }
> >
> >                 return String.format("%s://localhost:%d", protocol, port);
> >             }
> >         };
> >
> >         configuration.add(AliasContribution.create(BaseURLSource.class,
> > source));
> >     }
> >
> >
> >
> > Argo Vilberg wrote:
> >>
> >> hi,
> >>
> >>
> >> I want use pagelink with port 8443 and https protocol.
> >>
> >> If i use:
> >>     <t:pagelink page="Start" context="currentRole.roleId">
> >>                         ${currentRole.roleName}
> >>     </t:pagelink>
> >>
> >> then tapestry generate
> >> http://localhost/app/start/4
> >>
> >>
> >> But i want
> >> https://localhost:8443/app/start4
> >>
> >>
> >> Argo
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-pagelink-tp18796163p18843725.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