Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem opening file in IE

  Asked By: Bonni    Date: Aug 31    Category: Java    Views: 779
  

I am writing a file in the resonse' OutputStream and setting the content
type of the response same as the mime-type of the file. now when this
response is returned to the client :-

If the file is openable in IE, then it should open, otherwise the dialog
should come saying OPen/ save/ cancel etc.

But in my case every file is trying to open in IE, so for binary files like
zip, doc, ppt etc. junk appears on the screen. For binary types actually the
dialog should open.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Iris Sanders     Answered On: Aug 31

use the RFC standard.

For example, in my php program (i have not used java to respond to
things on port 80 before, but it should be the same). Set the
content-type header.

--- [ php ] ---
header( "Content-type: ", $mime-type );
--- [ php ] ---

I sugguest you appeand the line "Content-type: " to the HTTP header.

 
Didn't find what you were looking for? Find more on Problem opening file in IE Or get search suggestion and latest updates.




Tagged: