I have a web application developed using gwt.2.5.1, java. In my application 
i have a link "Volex page" which will send to the request to the other 
server(Volex).

supppose if i open my application with "http://localhost:8085/myApp"; and 
can see the "vloex page", once user clicks 
on the 'Volex page' it will be redirected to 'Volex server' like below.


 Window.Location("http://167.23.543.34:8087/VolexSer/volex";)

 The above url hits the volex server which needs some inforamtion like 
session id, for this i have to set the session id in the cookie like below:

        Date cookieDate = new Date();
        cookieDate.setDate(cookieDate.getDate() + 1);
        String baseUrl = "http://localhost:8085/myApp";;
        Integer nDomainInitialPosition = baseUrl.indexOf("/");
        Integer nDomainEndPosition = baseUrl.lastIndexOf(":");
        String baseDomain = baseUrl;
       
        if (nDomainInitialPosition == nDomainEndPosition) {
            nDomainEndPosition = baseUrl.indexOf("/");
        }
        baseDomain = baseUrl.substring(nDomainInitialPosition + 2, 
nDomainEndPosition);
        Window.alert("baseDomain: " + baseDomain);
        String eWebPageUrl = 
com.google.gwt.user.client.Window.Location.getHref();
        
        if (eWebPageUrl.contains("https://";)) {
            Cookies.setCookie("sessionId", getSessionId(), cookieDate, 
baseDomain, "/", true);
        } else {
            Cookies.setCookie("sessionId", getSessionId(), cookieDate, 
baseDomain, "/", false);
        }  


Here opening with two domains one is "localhost" other is "167.23.543.34", 
If i set the cookie like above, it is not showing in the request header. 
Can any body tell mw what is the wrong in the above code?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to