Hi,

On 06.08.2010 12:07, Carsten Ziegeler 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) ?

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 ;-)

So -1 to adding such a method.

Regards
Felix

[1]
http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java

> 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.
> 
> Carsten

Reply via email to