Never mind. I was able to resolve the issue.
The problem was in the hosted browser response.getText() corresponds
to response.getText().trim() where in IE, Firefox, Safari etc it
doesn't do trim.

My app now works like a charm.



On Jun 14, 9:03 pm, G <[email protected]> wrote:
> Eric -
>
> Thanks for your quick response (that too on a Sunday) :-)
> I was now able to locate where it is causing exception in firefox but
> not in hosted mode.
>
> I am using the RequestBuilder class to create the POST request to
> another servlet and parse the response. The problem is in the hosted
> mode, when (in the snippet below) onResponseReceived() gets called and
> the getStatusCode is 200, the response.getStatusText() is "OK" in case
> of firefox and IE instead of actual data which I see in the hosted
> mode.
>
> Any thoughts ??
>
> RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
>
>                 try {
>                         Request request = builder.sendRequest(null, new 
> RequestCallback() {
>                                 public void onError(Request request, 
> Throwable exception) {
>                                         Window.alert("Couldn't retrieve 
> data");
>                                 }
>
>                                 public void onResponseReceived(Request 
> request,
>                                                 Response response) {
>                                         if (200 == response.getStatusCode()) {
>                                                 // 
> Window.alert(response.getText());
>                                                 try {
>                                                         // to some processing
>                                                 }
>                                                 catch (Exception ex) {
>                                                         
> Window.alert("Exception in retrieving data ("+
> response.getStatusText() + ")");
>                                                 }
>
>                                         } else {
>                                                 Window.alert("Couldn't 
> retrieve data ("
>                                                                 + 
> response.getStatusText() + ")");
>                                         }
>                                 }
>                         });
>                 } catch (RequestException e) {
>                 }
>
> On Jun 14, 8:43 pm, Eric Ayers <[email protected]> wrote:
>
> > Hosted mode catches most but not all errors.  The best thing to do is
> > to try to narrow down the error.  Try adding try/catch blocks around
> > the code to help isolate it.
>
> > On Sun, Jun 14, 2009 at 9:22 PM, G<[email protected]> wrote:
>
> > > Hello -
>
> > > I am using GWT 1.5.3 and Gwt-maps1.0.4. My apps works perfectly fine
> > > in the hosted mode (when launched from GetMap-shell.cmd). But, when I
> > > click on "Compile & Browse", it opens up in firefox doesn't work.
>
> > > My application sets the marker position at regular intervals
> > > (depending on current lat/lon information). It thus calls google-maps
> > > api at regular intervals. In hosted mode its perfect but in firefox it
> > > seems it is not making *ANY* calls to google (I checked with firebug).
>
> > > Also, I have Tomcat 6.0 and tried to deploy my app. on that. Tomcat is
> > > running on port 8080.
>
> > > When I launch the hosted browser and point to my app. deployed on
> > > tomcat (@ 8080), it works perfectly fine but from firefox doesn't.
>
> > > It thus seems to be related to browser but I just cant figure out
> > > where and dont know how...
>
> > > I dont get any error on Firefox / Opera. But on IE 6 I see the
> > > following:
>
> > > Line:260
> > > Char:83
> > > Error: Exception thrown and not caught
> > > Code: 0
> > > URL:http://localhost:8080/GetMap/3D95......3317.cache.html
>
> > --
> > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to