When I run this program, an excel gets opens with junk characters. I face the same problem when I try to open a word document by changing the respective contenttype. But it works fine for pdf & txt file. Kindly help.
posted 8 years ago
Welcome to JavaRanch.
JSPs are not meant for streaming binary data; you should use a servlet instead. (It may work for some file formats -as you have found out- but not generally.)