9 Feb 2011 8:33 AM #1
GWT Frame not working in Mozilla Firefox or in Google chrome, but working fine in IE
Hi, I am trying to download a file from server. The normal GWT RPC call doesnot allow me to do that, and hence I wrote a servlet to do that job for me. From the client side, I am creating a Frame object, and I set the servlet URL in it, and add that frame Object in my root panel.
When I execute this in IE, a window pops up asking for Save/Open file.
But when I execute the same in a Firefox or a Google Chrome browser, nothing is happing.
I am not getting any request on my servlet/server side.
Here is a slice of the code :-
String servletUrl = "http://localhost:13080/Browser/ui/da...let?level=ZERO";
Frame frame = new Frame(servletUrl);
So, can someone please help me out.
Thanks in advance
9 Feb 2011 11:26 PM #2
Hi, I did some more investigation.
In Google Chrome, when I open the Developers Tools, I see a "Failed to load resource" exception, and the resource is my Servlet. So, that means the servlet is not being identified by the Chrome browser, and hence I dont get any response back. (Though if I paste the Servlet GET URL directly in a browser, I see proper output).
In Mozilla firefox, I see that my servlet is receiving the request. It processes it and generated proper output, and then returns. But still, in client side, I dont see anything.
Actually i am returning a CSV file from my servlet, but here I dont get any pop-up.
The same code is working fine in IE.
I really need to fix this issue, atleast in Mozilla, so any help/suggestions would be appreciated.
Or is there something else I can use in place of GWT Frame to make it work?
Thanks in advance.
10 Feb 2011 12:45 AM #3
Hi. I would recommend you to use the Window.open instead of the frame stuff. It is easier, and it works for me in all browsers.
Do it like this:
com.google.gwt.user.client.Window.open(yourDownloadUrl, "Download", "");
10 Feb 2011 5:13 AM #4
Thanks a lot, that worked.
Here, the new window name is not taking any space in between. I mean, earlier I was using the following code :-
com.google.gwt.user.client.Window.open(yourDownloadUrl, "CSV Download", "");
but was getting illegal Argument error. So I renamed it as "CSVDownload", and it worked
19 Oct 2011 7:52 AM #5
Want other page in My web page
But do we have any other option other than window.open() as I need a web Page displayed in my web page
27 Oct 2011 5:12 AM #6
By lakshmiarun in forum Ext GWT: DiscussionReplies: 1Last Post: 23 Dec 2010, 12:58 AM
By Hari.r in forum Ext GWT: DiscussionReplies: 8Last Post: 23 Sep 2010, 4:36 AM
By hirentech in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 25 May 2010, 10:57 AM
By googlegoo in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 14 Feb 2009, 2:06 PM