---------------------------------------------------------------- BEFORE YOU POST, search the faq at <http://java.apache.org/faq/> WHEN YOU POST, include all relevant version numbers, log files, and configuration files. Don't make us guess your problem!!! ---------------------------------------------------------------- In case anybody's interested, I just found the answer to my problem ;) You just need to set the HTTP Header "Content-Disposition:" to include the suggested filename to the client. It goes something like this: res.setContentType("application/msword"); res.setHeader("Content-Disposition:","attachment; filename=resume.doc"); res.setContentLength(data.length); out.write(data); out.flush(); Walla! The Save As dialog comes up with "resume.doc" already filled in. -Rob On Thu, 9 Mar 2000 [EMAIL PROTECTED] wrote: > ---------------------------------------------------------------- > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/> > WHEN YOU POST, include all relevant version numbers, log files, > and configuration files. Don't make us guess your problem!!! > ---------------------------------------------------------------- > > I need to write files (of various MIME tyoes) through a > ServletOutputStream to clients, but I'd like to be able to preserve the > filename for the client, so that they aren't presented with a dialog box > asking them to save a file with a name like "FileDownloadServlet." > > Does anyone know of a way to accomplish this? > > Thanks. > > -Rob > > > > -- > -------------------------------------------------------------- > Please read the FAQ! <http://java.apache.org/faq/> > To subscribe: [EMAIL PROTECTED] > To unsubscribe: [EMAIL PROTECTED] > Archives and Other: <http://java.apache.org/main/mail.html> > Problems?: [EMAIL PROTECTED] > -- -------------------------------------------------------------- Please read the FAQ! <http://java.apache.org/faq/> To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/main/mail.html> Problems?: [EMAIL PROTECTED]
