Hello everybody!

I would like my servlet or jsp-page to download a file from an http or https
url
(for example: http://www.domain.com/filetodownload.pdf). So I suppose
I must use HttpUrlconnection or HttpsUrlconnection classes. Am I right?
How can I do all this in my servlet? Then I would like to send the file just
read to the
user that connects to my servlet: is it possible to send it
"on the fly" without saving it on disk before? In fact I would like to send
it
to the user while the servlet is reading (downloading) it.
Which type of java variables (String or what??? )must I use to store
"temporarly" the data of the file
I am reading and downloading?

Can you give me a code example please?

Thanks a lot in advance!

                                 Luca

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to