wood burning stoves 2.0*
The moose likes Servlets and the fly likes Not able to view popup to save xls file(in IE7), writing file into servlet response. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Not able to view popup to save xls file(in IE7), writing file into servlet response." Watch "Not able to view popup to save xls file(in IE7), writing file into servlet response." New topic
Author

Not able to view popup to save xls file(in IE7), writing file into servlet response.

yogesh goswami
Greenhorn

Joined: May 26, 2011
Posts: 6
I am writing a xls file in servlet response. When user request for file using url "http://localhost:8080/AppName" code is working fine in IE7 however when i am trying with IP("http://10.0.1.54:8080/AppName") instead of localhost it dosen't work. I do not gets any popup to save xls file.

1 The same code with ip in url("http://10.0.1.54:8080/AppName") works fine in mozilla and IE 6.
2 Code works fine for all ie versions if i map IP with some name in host file.

I a m using jdk 1.6, tomcat 6 and IE7/IE 8.

1 I have set content type as "application/vnd.ms-excel" and header as "Content-Disposition", "attachment; filename=xyz.xls" in IE and "Content-Disposition", "inline; filename=xyz.xls" for mozilla and others.

Please suggest me how to overcome from this problem. Thanks for your precious help in advance.

Regards, Yogi
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

When you finally deploy your application will people be accessing it via an IP address? If not I wouldn't worry too much about a vaguery of IE.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
yogesh goswami
Greenhorn

Joined: May 26, 2011
Posts: 6
Paul Sturrock wrote:When you finally deploy your application will people be accessing it via an IP address? If not I wouldn't worry too much about a vaguery of IE.


Yes .. it could be access using IP if it is deployed on intranet. If you know some thing please share with us.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Afraid I can't offer an explanation, but what I do know is that IE has what could best be described as a "heuristic" approach to deciding what to do with files when downloaded, and that there are various client-specific configurations that can interfere with this. Personally I would not spend that much time trying to figure it out; I'd just add a DNS entry for the host machine and let people use the version that works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to view popup to save xls file(in IE7), writing file into servlet response.
 
Similar Threads
Issue with Download using ZipOutputStream
word doc servlet filename question
opening pdf inline in a new pop up
Setting response header
repost with more detail on problem of download servlet in Internet Explore