Hi, Not sure that this is the best way, but I did it like this:
@Inject private Request request; @Inject private RequestGlobals requestGlobals; public String getHostUrl(){ if(hostUrl == null){ hostUrl = getRequestGlobals().getHTTPServletRequest().getScheme()+"://"; hostUrl += getRequest().getServerName(); if(getRequestGlobals().getHTTPServletRequest().getServerPort() != 80){ hostUrl += ":"+getRequestGlobals().getHTTPServletRequest().getServerPort(); } } return hostUrl; } -- Cheers, Dariusz On Wed, Mar 17, 2010 at 7:35 PM, Algirdas <algirda...@gmail.com> wrote: > > For registration process, I need to send user an email with an absolute > link > to my site, which finalizes the > registration, that is, full URL with protocol (may be https), site name, > page & parameters: > > http://www.somemysite.com/register/p=RTWE343434dsfdf3435353sfsdfsdfdsf > > > Is there a way from Tapestry (5.1.0.5) to generate such URL? > -- > View this message in context: > http://n2.nabble.com/How-to-create-absolute-URL-tp4752509p4752509.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >