I think you can just add multiple context values to your page render link like so.
@Inject private PageRenderLinkSource linkSource; Link link = linkSource.createPageRenderLinkWithContext(YourPage.class, context1, context2); String absoluteURI = link.toAbsoluteURI(); System.out.println("URL " + absoluteURI); On Thu, Apr 10, 2014 at 7:30 PM, Sanket Sharma <sanketsha...@gmail.com>wrote: > Hi, > > Is there a way to get the URL of a page with request parameters in REST > format? e.g. I have a REST scheme based on the following format > http://localhost:8080/products/categoryid/productid > > Is there a straightforward way for creating URLs like this? I was looking > at PageRenderLinkSource - I see it has add parameter method, but what would > be the parameter name in this case? Moreover, that generates URL in the > form of query parameters. How do I generate a REST URL? > > Also, what would be the best way to replace localhost/hostname for outgoing > links? Since the application will be running behind a > firewall/loadbalancer, the hostname will not be same as publicly visible > hostname. > > I was thinking of reading the hostname/internet address from a properties > file and just appending the base path to it? Is there a better way of > achieving this? > > > Thank you for your help. > > Sanket > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York