tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rob" <rob_m...@fastmail.fm>
Subject populating save as... dialog for application/octet-stream content type
Date Sun, 03 Feb 2002 12:01:50 GMT
I'm trying to 'suggest' a filename for download when I send binary output as
a reply.

I would like the suggested filename to appear in the save as... dialog that
pops up when the response is sent (rather than whatever the url may be at
the time).

My servlet basically does this.

setContentType("application/octet-stream");
open a file ..
OutputStream is = response.getOutputStream();
loop ( read from file into buffer while not end of file )
is.write( buffer );
close streams input & output

If there is a more appropriate list for this posting please tell me.
Otherwise a solution would be helpful.

Thanks

rob



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message