shivan wrote:
>
> Hi,
> I have your book. It's good. However, I couldn't find
> any info about downloading a file attachment in email.
> I am creating a servlet with e-mail functionality
> (similar to yahoo/hotmail).
> Please help.
I'm working on adding some text in the second edition. The short
summary is that if you send the file contents with a content type like
application/octet-stream the browser will generally offer to save the
file. So use something like ViewFile to do the sending.
The tricky part is that IE does content sniffing so if you send IE a
GIF file, it's going to display it no matter what content type you
specify and no matter what file extension you use. Stupid IE.
If anyone has a workaround for this, please let me know. I suspect
there isn't one since even Yahoo Mail doesn't have a fix. They just
make the file available and if you're using IE you have to right click
to save certain popular types (GIF, JPEG, HTML, etc).
-jh-
--
Jason Hunter
[EMAIL PROTECTED]
Book: http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.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