I am new to servlet technology, i need to write code to download files from the server at client side.
Can we download files diectly from the server using servlet technology?
Please provide the valuable suggestions.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I understand you correctly, You can download the file from HTTP servlet via response.sendRedirect() for files available in public location.
Else you need to use the response output stream to bind the file information so that it will prompt you to download for a file:
I gues you can handle the exceptions, of course.