Hello everybody!

I have problem: I have a web-site where there is a servlet running....let's
suppose the servlet name is "MyServlet". Some users can connect to the
web-site
and request to the servlet to download a .pdf file (but the file type is not
important and could be different). The file name is passed to the servlet
sending a parameter, for example connecting
to the url:

http://mydomain.com//MyServlet?FileName=File.pdf


Note that the requested file is on a different web-site (let's suppose
http://otherdomain.com)
and the servlet must connect to this other site and download the file
requested ("File.pdf") before sending it back to the user.

That I need to know is:

1)How can I download a file from another site using a servlet? I
mean....Which java code must
   I add to my servlet to do this?

2)Before sending the file to the user who requested it must I save it on
disk or can I send
it to the user "on the fly"?

3)How can I send the file from the servlet to the user that requested it?

I hope someone can help me!

Thanks a lot in advance.

                                        Luca

___________________________________________________________________________
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