Download a file and give the file name as default name while saving

Hi folks

I am facing a problem. I have jsp which fetchs the file name and it's location from the database.

It can fetch many row's. Now i have provided a radio button, against each row, By clicking on it , the user selects the file to download.

And clicks on download button, which call an action say "Download File".

It's downloading the file successfully. But displaying the action name as default name while selecting the location to save the file on local machine.

I want the file name which he opted to download, should get displayed as default name.

[596 byte] By [Pandurangaa] at [2007-11-27 2:37:36]
# 1
Set it in the content disposition header.The downloadFile() snippet here might give some useful insights: http://balusc.xs4all.nl/srv/dev-jep-pdf.html
BalusCa at 2007-7-12 2:57:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks a lot,
Pandurangaa at 2007-7-12 2:57:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...