I have a load of text files that users can download from my site. I Wrote a short servlet to send them to the user with a "open, save as" dialog box.
On the HTML side I Currently have a link
BTW I had to change the servlet to a doGet instead of a doPost to work.
The Question: Using a link, not a form, I would like to call the servlet with the name of the file I want to download. This will mean I do not need a new servlet for each file. How do send from the HTML page the name of the file to my HttpServletRequest ?
Thanks
On the HTML side I Currently have a link
Code:
<A HREF="/servlet/FileServer">text.txt</A>
BTW I had to change the servlet to a doGet instead of a doPost to work.
The Question: Using a link, not a form, I would like to call the servlet with the name of the file I want to download. This will mean I do not need a new servlet for each file. How do send from the HTML page the name of the file to my HttpServletRequest ?
Thanks