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.
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.