The moose likes Servlets and the fly likes How to download images from a remote machine? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to download images from a remote machine?" Watch "How to download images from a remote machine?" New topic

How to download images from a remote machine?

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
Hello all,

I have a curious problem.
I have hosted an application on Tomcat. One of the modules called 'Employee Directory' needs to display the images of employees. Now my problem is that the Employee images are stored on one particular machine in the intranet.(For eg: \\\\images\Bob.jpg). Now on the Home page i need to show a link for 'Employee Directory' on click of which i need to display the pages with the images. But the images as i mentioned earlier are present on someother machine (which is known) other than the machine on which Tomcat server is running.
One option would be to make my servlet (on servlet load) download the images to some location on the server and then display on the client. But in this case i would always need my login to the Remote machine from my server to make the images available. How do i get about this?
are there any other solutions??
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
See this thread's first reply; that's basically what you'll have to do if you don't provide an HTTP-accessible URL to the images.
It is sorta covered in the JavaRanch Style Guide.
subject: How to download images from a remote machine?
Similar Threads
Image Viewer Applet
Servlet as an rmi client
to draw the bar charts
Buffering in Java
Servlet to WebLogic