I want to be able to allow users to download ANY binary file from a
web server using servlets. The servlet must operate on either NN and
IE environments.
I have tried the following:
res.setContentType("application/x-zip-compressed; name=\"" + itemName+
'\"');
res.setHeader("Content-disposition", "attachment; filename=\\"" +
itemName +'\"\);
res.setContentLength(getItem().length);
This works fine, if I want to download a zip file. But if I want to
download a file which is not a zip, how am I supposed to do? I
developed a servlet (works beautifully), different from Jason
Hunter's, that uploads ANY binary file using multipart/form-data and I
simply can't do the same for a download.
Does any of you, Servlet experts, have an example of a servlet that
downloads ANY binary file? I would appreciate any help from you.
Thanks
===
Joao Carlos Costa
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html