hello all

i have a tgz file on the system.Now i want to download it in my jsp page.but i have not any idea how to do it.

currently i am downloading the text file in jsp using following code

response.setContentType("Text/html");
 response.setHeader("Content-Disposition","attachment;filename="+strFileName+"");

please help.....

Recommended Answers

All 2 Replies

Please refer the MIME types list.

Please refer the MIME types list.

i have done that and there is also prompt fro the download or open the tgz file.but when i open the file it tells "Unknown Format oR FILE IS DAMAGED".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.