0

Whenever I click on one button it has to get one directory from other server and has to download onto the local machine. How can I do that using java and javascript.?

Thanks in advance.

Edit

I'm using linux Os. Whenever I click on Download button from local machine(IP address:10.180.66.33), it has to connect to server(IP address:10.180.14.2) with username,passwd and it has to download one directory /home/alvin/project1/ to local machine(10.180.66.33). How can I do this?

2
  • Erm, simply change the URL to point to the file you need. Done, now the browser will handle it - it will pop up with "Do you want to save this file". You CANNOT force a download. Or rather, you might be able to, but you shouldn't. Commented Apr 6, 2015 at 10:02
  • It works only for the files which are present on same machine, but my question is to download files which are present on other machine Commented Apr 6, 2015 at 11:38

1 Answer 1

2

Please go through Download file in Servlet

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.