I've recently talked to M$ about these issues.  In
general in IE5 setting HTTP header values will force a
"Save As" dialog when downloading a file.  But, there
are still problems.  Be prepared for a hour glass
cursor that won't change back to a cursor (very
annoying) -- documented bug on M$'s site (you can hide
this with a frame set).  And even worse is the
behavior IE4 has.  If your downloading a text file
there is absoultly no way to force a "Save As" dialog
-- it will be displayed in the browser without a
prompt of any kind (yuck!).  The file will be
"snooped" by IE4 no matter what the HTTP header, name
of file, or file extention.  Here's a quote from MS
regarding this mess:  "Yeah, IE4 was disigned to
display a downloaded file if it can.  Write an ActiveX
control to fix your problem."  Of course, I haven't
had any of these problems with Netscape.  Wouldn't it
be nice if MS would just conform to the standards!

--- kurt kessel <[EMAIL PROTECTED]> wrote:
> Have the servlet send the document, but set the
> header as follows:
>
> response.setHeader("Content-disposition",
> "attachment; filename=" +
> fileName);
>
> This will change the name. If the content type is
> known and the user has
> set his/her browser to "no prompt", the download
> will happen without
> being propmted. If you really want to prompt the
> user for location use
> a valid unknown content type like
>
> response.setContentType("video/x-unknown");
>
> If this content type is unknown, then the user will
> be prompted.
>
> Kurt Kessel
> [EMAIL PROTECTED]
>
>
> > -----Original Message-----
> > From: Desarrollo
> [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 08, 2000 2:26 PM
> > To: [EMAIL PROTECTED]
> > Subject: file download
> >
> >
> > hi...
> > I'm developing a servlet that uses JavaMail API.
> > When displaying the attachment
> > information for a message, i want to display a URL
> such that when i
> > click on that URL i get a "Save As" dialog from
> the web browser that
> > is initialized with the filename of the
> attachment, so
> > i need an URL that has the filename as the last
> component of
> > the URL, followed by any needed "?" parameters,
> but
> > in this case i need to create dinamically an
> servlet
> > with the file name that i want, and then this
> invented
> > servlet must call the really servlet ????
> >
> > how i do that???
> > or, exist other solution ???
> >
> > thanks
> >
> >
> >
> >
> >
>
--------------------------------------------------------------
> > ----------------------
> > Obtenga su direcci�n de correo gratuita en
> > http://serverlx.gye.ramt.com/servlets/mail
> >
> >
>
______________________________________________________________
> > _____________
> > 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
>
>
___________________________________________________________________________
> 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

=====
------------------------------------------------------------
James Wilson
HealthFirst Corporation
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.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

Reply via email to