google-code-export / rocket-gwt

Automatically exported from code.google.com/p/rocket-gwt
1 stars 1 forks source link

Unable to specify extra paramters sent to comet servlet #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently in CometClient.start() there is code:

DOM.setElementProperty(frame, "src", this.getServiceEntryPoint() +
"?serializationEngine=Gwt&" + System.currentTimeMillis());

which always appends '?' after service entry point. This could be replaced
with:

String queryString = this.getServiceEntryPoint();
boolean questionMarkFound = false;
for(int i = 0; i < queryString.length(); i++){
    if(queryString.charAt(i) == '?'){
        questionMarkFound = true;
    }
}   
DOM.setElementProperty(frame, "src", this.getServiceEntryPoint() + (
questionMarkFound ? "&" : "?") + "serializationEngine=Gwt&" +
System.currentTimeMillis());

Then creating comet instance one can specify additional parameter sent to
comet servlet (like client id) - which may be read in polling method. This
is needed when implementing funcationality where different data is sent to
different clients.

What version of the product are you using? On what operating system?
any OS, Rocket 0.56

Original issue reported on code.google.com by Marcin.A...@gmail.com on 18 Nov 2008 at 1:26

GoogleCodeExporter commented 9 years ago
I was actually thinking of removing the serializationEngine parameter so the 
problem
you describe doesnt exist... What do you think ?

Original comment by miroslav...@gmail.com on 2 Dec 2008 at 8:38

GoogleCodeExporter commented 9 years ago
Yes, this will solve the case.
Thanks,
Marcin

Original comment by Marcin.A...@gmail.com on 2 Dec 2008 at 11:49