On Fri, Aug 6, 2010 at 14:25, Felix Meschberger <fmesc...@gmail.com> wrote: > Excellent point: Have a look at Sling's > HttpServletResponse.encodeURL(String) method [1]. > > And yes, this is a method which has been there for a long time, but > developers don't seem to be used to use it ;-)
I know it, but it doesn't fit at all: encodeURL() doesn't generate absolute URLs, its main purpose is to add the session ID, which we don't want in Sling. My idea was to have a reliable single method for generating absolute URLs, and for the sake of consistency and simplicity for the client, have a similar one (or decide via a flag) for generating relative URLs (what ResourceResolver.map(request, path) is doing). Regards, Alex -- Alexander Klimetschek alexander.klimetsc...@day.com