tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AAron nAAs" <aaron_n...@hotmail.com>
Subject Re: session across different domains ?
Date Sat, 11 Jan 2003 23:51:57 GMT
I think you will have to code specifically for Tomcat. The only way to get 
jsession encoded into your string is with Request.encodeURL or 
Request.encodeRedirectURL, but they won't do it because Tomcat will 
determine that encoding wasn't necessary, and will return your string as-is. 
"isEncodeable()" is quite strict in Tomcat.

Here is from org.apache.catalina.connector.HttpResponseBase:

    /**
     * Encode the session identifier associated with this response
     * into the specified redirect URL, if necessary.
     *
     * @param url URL to be encoded
     */
    public String encodeRedirectURL(String url) {

        if (isEncodeable(toAbsolute(url))) {
            HttpServletRequest hreq =
              (HttpServletRequest) request.getRequest();
            return (toEncoded(url, hreq.getSession().getId()));
        } else
            return (url);

    }

See this which does the Tomcat servlet container's encoding:
org.apache.catalina.connector.HttpResponseBase.toEncoded()

-AAron

>From: Tim Funk <funkman@joedog.org>
>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>To: Tomcat Users List <tomcat-user@jakarta.apache.org>
>Subject: Re: session across different domains ?
>Date: Sat, 11 Jan 2003 13:15:48 -0500
>
>When you link to the new domain, URL encode the session id into the link. I 
>think either the servlet spec or tomcat docs should tell you you can do 
>this.
>
>-Tim
>
>Albrecht Berger wrote:
>>Hello,
>>is there any way to keep the sessions when changing the domain ? I have 
>>only one webapp, but it is distributed acrosss
>>different domains.
>>
>>Thx
>>berger
>>
>>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:tomcat-user-help@jakarta.apache.org>


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message