The problem is probably that the server sets the content-type to be the
image/jpeg, which the browser then automatically assumes it is meant to
display.  If you find that you would prefer to directly save this without
any screen display, you could write a servlet which serves the image in
question after setting the content type to be something the browser is quite
unlikely to recognize (for example, image/SAVEIT).  Unfortunately, this
means
that the user will have to know in advance that the file is of type Jpeg in
order
to select an appropriate suffix for the file to be saved.

-AMT

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Duffey
> Sent: Wednesday, April 19, 2000 1:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: downloading images
>
>
> I am not quite sure I understand the problem. JSP is a server-side
> technology.you place the same HTML in your JSP page as you would
> HTML to do
> this. Unless..you mean because its an image it shows up in the browser
> itself, instead of letting the user "save" it to disk. In that case, the
> user can just right-click and save as, or save from the file menu. If the
> file is other than gif/jpg, it should be able to save it, such as tif.
>
>
>
> >here is the user experience i am trying to create:
> >
> >user sees:
> >
> >image and a "download" button
> >
> >user clicks button
> >
> >user sees the "open this file from current location/save this
> file to disk"
> >dialog box for the (here's the catch) jpg file (the image they
> are seeing).
> >
> >does anyone know if there is a way with java/jsp/java
> >beans/servlets to make
> >this happen?  has anyone ever done this?
> >
> >=================================================================
> ==========
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> >JSP-INTEREST".
> >Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to