Problem while sending a jar to a Browser through servlet

Hi All,

In my project I need to show a link to a file which is present in one of the folders of my server,when the user clicks it should pop up a window saying that save or cancel.In my code i am using servletoutputstream to read the file through the servlet but the problem is when the user clicks it ,the extension and filename or getting lost.means i am getting the filename equal to my servlet name.This is not acceptable in my project as the user doesn't know after downloading what file it is.Please provide me a solution.Thanks in advance.

Regards,

Naveen

[588 byte] By [Naveenkka] at [2007-11-27 8:07:24]
# 1
How exactly are you sending the file back currently, give a little detail if you want help.
Elementala at 2007-7-12 19:50:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
If the file is not generated dynamically, i.e. if it is static in a directory, why are you using servletoutputstream to read and send it to the browser? Why not just provide a href link to the file?
k_i_shora at 2007-7-12 19:50:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...