You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Brian Long <bl...@annadaletech.com> on 2011/10/03 11:20:33 UTC

pageRenderLinkSource.toAbsoluteURI() returns relative URL

Hi all,

I want determine the URL of my tapestry page, and rather that build
the path from the request, I thought I'd use the PageRenderLinkSource
service similar to the example posted here
http://blog.markwshead.com/825/get-the-url-of-page-in-tapestry-5/,
however when I call the method toAbsoluteURI() I get a relative path
/myserver/en/receipts/kioskreceipt instead of
http://localhost:8080/myserver/en/receipts/kioskreceipt?


I'm using Tapestry 5.1.0.5.

Regards, Brian.

	@Inject
	private PageRenderLinkSource linkSource;


	logger.info(linkSource.createPageRenderLink(kioskReceipt.getClass()).toAbsoluteURI());

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


Re: pageRenderLinkSource.toAbsoluteURI() returns relative URL

Posted by Peter Stavrinides <P....@albourne.com>.
Yes, this is a bug I have seen too, I hacked together my own fix for this, but somehow in 5.3 is working correctly again.

----- Original Message -----
From: "Brian Long" <bl...@annadaletech.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, 3 October, 2011 12:20:33 GMT +02:00 Athens, Bucharest, Istanbul
Subject: pageRenderLinkSource.toAbsoluteURI() returns relative URL

Hi all,

I want determine the URL of my tapestry page, and rather that build
the path from the request, I thought I'd use the PageRenderLinkSource
service similar to the example posted here
http://blog.markwshead.com/825/get-the-url-of-page-in-tapestry-5/,
however when I call the method toAbsoluteURI() I get a relative path
/myserver/en/receipts/kioskreceipt instead of
http://localhost:8080/myserver/en/receipts/kioskreceipt?


I'm using Tapestry 5.1.0.5.

Regards, Brian.

	@Inject
	private PageRenderLinkSource linkSource;


	logger.info(linkSource.createPageRenderLink(kioskReceipt.getClass()).toAbsoluteURI());

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


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