Hello Everybody!
I need some help with the following bit of code, i want to download a file
to a client that way but i get an IllegalStateException: text and binary
input can't be mixed.
Here's the code:
String filename = request.getParameter("filesrc");
byte buffer[] = baos.toByteArray();
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" +
filename);
response.setHeader("Content-Transfer-Encoding", "8bit");
ServletOutputStream out2 = response.getOutputStream();
out2.write(buffer);
out2.flush();
out2.close();
Thanks for your help.
Michael Weller
___________________________________________________________________________
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