On Fri, Aug 6, 2010 at 12:07, Carsten Ziegeler <cziege...@apache.org> wrote:
> Alexander Klimetschek  wrote
>
>> Another reason for the prominent place is that it teaches people to do
>> the right thing more easily. I have seen many cases that create links
>> without considering context path or sling's mapping.
>>
> Hmm, but if a developer is not able to call map on the resource resolver
> why should he now call a method on the request (or response) ?
> Maybe the map method is not very prominently placed, but I would rather
> do an example showing people how to do it, instead of adding all kind of
> stuff to the request interface.
> Again, maybe this stuff is very useful for everyone and it makes sense
> to add it to a more prominent place. But atm I doubt this.

Maybe you are right.

Actually I now think that the ResourceResolver would be a better
location, to be able to generate absolute URLs (ie. including host and
context path) outside of the request scope. That would require some
additional configuration in the resolver or under /etc/map. Currently
I am doing that in a custom service.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com

Reply via email to