You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Travis McLeskey <tr...@mac.com> on 2008/02/12 17:25:26 UTC

T5: How to create an external URL to a Tapestry page?

For example, if one wanted to generate a complete URL (including  
protocol, server name, and port) and send it in an email.

I tried ComponentResources.createActionLink() and  
Component.createPageLink(), but the Link objects returned by those  
methods do not include the server name, etc.

In Tap4 there was the ExternalService. I'm sure there is a Tap5  
equivalent...I just can't find it.

Thanks,
Travis


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: How to create an external URL to a Tapestry page?

Posted by Howard Lewis Ship <hl...@gmail.com>.
The URLs are very predictable.  The biggest issue is with the
hostname, it is often easier for your application to provide the
correct URL than Tapestry, as the information about server name that
it gets from the Servlet API is often wrong, referring instead to the
internal server forwarded to by the firewall (aka the reverse proxy)
which may not be a server visible to the end user.

If you have a Link instance, you can invoke toAbsoluteURI() to get the
full URI path (that is, everything after the host name portion of the
URL).

As pointed out, there are methods on ComponentResources for obtaining
such Link objects.


On Feb 12, 2008 4:54 PM, SergeEby <sd...@hotmail.com> wrote:
>
> Hey,
>
> Just return a URL object
>
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
>
> /Serge
>
>
>
> Travis McLeskey wrote:
> >
> > For example, if one wanted to generate a complete URL (including
> > protocol, server name, and port) and send it in an email.
> >
> > I tried ComponentResources.createActionLink() and
> > Component.createPageLink(), but the Link objects returned by those
> > methods do not include the server name, etc.
> >
> > In Tap4 there was the ExternalService. I'm sure there is a Tap5
> > equivalent...I just can't find it.
> >
> > Thanks,
> > Travis
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/T5%3A-How-to-create-an-external-URL-to-a-Tapestry-page--tp15436877p15446980.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: How to create an external URL to a Tapestry page?

Posted by SergeEby <sd...@hotmail.com>.
Hey,

Just return a URL object

http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

/Serge


Travis McLeskey wrote:
> 
> For example, if one wanted to generate a complete URL (including  
> protocol, server name, and port) and send it in an email.
> 
> I tried ComponentResources.createActionLink() and  
> Component.createPageLink(), but the Link objects returned by those  
> methods do not include the server name, etc.
> 
> In Tap4 there was the ExternalService. I'm sure there is a Tap5  
> equivalent...I just can't find it.
> 
> Thanks,
> Travis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-How-to-create-an-external-URL-to-a-Tapestry-page--tp15436877p15446980.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org