W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 2000

Re: download servlet

From: j Brax <jBrax@csi.com>
Date: Tue, 23 May 2000 15:12:21 -0400 (EDT)
To: <www-jigsaw@w3.org>
Message-ID: <000001bfc4ea$41a09ea0$6c6be8c3@jb>
I retrieved some code from JavaWorld, so here is another answer:
				res.setContentType("application/x-www-form-urlencoded");
				res.setContentLength(lfile);
				res.addHeader("Content-disposition","attachement; filename="+fic1);

String variable fic1 contains the file name, if you are using servlet 2.1,
you should be using instead
function res.setHeader("Content-disposition","attachement; filename="+fic1);

As for ContentType, Roland Mainz might be right.

Hope this help

j Brax
Received on Wednesday, 24 May 2000 19:02:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:34 GMT