Hi,
I am streaming a file back using a new window and a call to a servlet.
This works fine locally and even in hosted mode, although in hosted
mode the blank window stays open.
I have a testing server that is being accessed via a Citrix desktop
and in that desktop there is only IE7 for a browser. When I run the
app in that environment, the popup (a new window/tab) will close as
soon as the response comes back (i.e. when the file is done being
created after 10 seconds or so) The popup blocker is turned off and
the test server is a trusted site.
By intuition I tried holding CTRL when I clicked the "submit" button
in the GWT app. (this saves the settings and onSuccess opens the new
window and creates the file using the settings in the session) When I
hold CTRL, I will get the save as dialog box and after I select the
location to save it, I can release the CTRL button.
Any ideas why this is happening?
BTW, I have the content disposition set to attachment. here is the
last portion of the file streaming process:
//bunch of stuff
....
byte[] reportAsBytes;
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
service.generateOutput(ouputProcessed, baos,
reportSettings,
dbConnectionInfo);
reportAsBytes = baos.toByteArray();
logger.debug("ByteArray is length " +
reportAsBytes.length);
// setting some response headers
response.setHeader("Expires", "0");
response.setHeader("Cache-Control",
"must-revalidate,
post-check=0,pre-check=0");
response.setHeader("Pragma", "public");
String extension = ouputProcessed.getFileExtension();
response.setContentType(ouputProcessed.getContentType());
response.setHeader("Content-Disposition", "attachment;
filename="
+ reportSettings.getName()
+ ((extension == null) ? "" : ("." +
extension)));
response.setContentLength(reportAsBytes.length);
logger.debug("Getting the output stream from the
response");
servletOutputStream = response.getOutputStream();
servletOutputStream.write(reportAsBytes, 0,
reportAsBytes.length);
servletOutputStream.flush();
servletOutputStream.close();
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---