Well, you could package the image in a zip file, or instruct your user on
how to save a URL's contents to disk.

Depending on your webserver, there could be a way to configure it so that
all URLs with "/servejpg/" or something like that in them would get
processed
by your servlet.  Alternatively, you could have your servlet redirect the
browser to the actual JPG, saved in a temporary file (or to a permanent
location).

HTH,

Rob Whelan

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert Whelan      NesTek Development Corp.
Software Engineer  6780 Pittsford-Palmyra Rd.
[EMAIL PROTECTED]    Fairport, NY 14450
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----Original Message-----
From: Alvaro Fuentes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 21, 1999 7:18 AM
To: [EMAIL PROTECTED]
Subject: Problems downloading image files


I have a servlet which downloads an image file to client machine. If I
set

res.setContentType("image/jpeg");

, clients will show the image. Instead of this, what I want to do is
open browser's file dialog to allow clients to save the image, so I must
include
res.setContentType(someStrangeContentTypeNotRecognizedByClientBrowser);

Is there any way to avoid this without changing web server
configuration?

Moreover, the name of the file which appears in browser's file dialog is
the name of the servlet, not the name of the image. Is there any way of
changing this?

Thanks in advance

___________________________________________________________________________
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

Reply via email to