You don't send any "file" to the browser. You send a stream of data. The content type tells the browser how to interpret the stream. It's your responsiblity to make sure that the format of the stream corresponds to what you told the browser you were sending it.
If you send a PDF-formatted stream to the browser and tell the browser that the content type is a
Word document, obviously no automatic conversion will take place.
That's where tools like POI come in, and why it's a
spectacularly bad idea to do something like this in a JSP.
[ September 07, 2005: Message edited by: Bear Bibeault ]