By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

How to download a file from server machine to client machine using jsp

P: 14

In my application, I have an excel file stored on my server machine. How can I download that excel file on to my client machine using jsp. Is there any other way I can open that file from my machine and save it in my machine using jsp/java?

Its an emergency for me to do this.

Can anyone provide me the full code to download a file from server machine as I don't have

time to browse through various sites.

thanks in advance,
Jun 3 '09 #1
Share this Question
Share on Google+
2 Replies

P: 2,476
I think if you googled then surely you could get a link.
What you need, first you have to set MIME type(specially for download, right now i can't remember) then open ServletOutputStream and write file contents into it.
Jun 3 '09 #2

Expert 10K+
P: 11,448

kind regards,

Jun 3 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.