Hi,

Alexander Klimetschek schrieb:
> On Wed, Oct 15, 2008 at 9:36 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
>> Currently the URL is not prefixed with the context path.
>>
>> Questions:
>>
>> (1) Would this be, what you envisioned ?
> 
> Yes, mainly the context path prefix is what I need.

Ok. Although such a method (whatever we use at the end of the day),
could also be basis for a filter, which ensures the url is an
addressable resource (if pointing to a resource).

> 
>> (2) Obviously this implementation is not exactly what the Spec says, the
>> encodeURL method is about: encodeURL is used to rewrite the URL to add
>> the Session ID.
> 
> Seen that, and I think we should have a separate method here, as we
> don't want a session ID in Sling apps ;-)

do we ? actually, what we say is "don't use HttpSessions".

But if an application still wants to use an HttpSession (for whatever
reasons) and the client disables cookies (for whatever reasons), the
encodeURL method is the one described by the spec to be called to ensure
the URL bears the session ID.


> and don't want to be in
> conflict with the spec. Since the current implementation of encodeUrl
> calls the super implementation at the end, you would get the session
> ID as part of the URL if cookies don't work (IIRC).

Yes. And this is actually the trick ;-) The method works as specified
(gets the session id attached if required) plus the URL is mangled to
include the context and be a valid external URI.

Regards
Felix

Reply via email to