Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Downloading a word document using JSP

I am trying to download a Word file from jsp and from my research, I noticed that I can use an <a href""> </a> tag.

So I tried it usign the following code:
<a href = "<%=ClaimForm.doc%>"> Download a Claim Form</a>

but I am getting the following message:

Undefined variable or class name: ClaimForm
out.print(ClaimForm.doc);

Could anyone debug or inform me of how else I can download a Word Document by letting the user click on a hyperlink? :confused:
[542 byte] By [Maria Modeste] at [2007-11-11 6:59:01]
# 1 Re: Downloading a word document using JSP
Isn't this supposed to be "good HTML"? If so, take out the extra <% and %> and just have the name of the document in quotes following your href=. If the doc is being generated on the fly by a jsp, reference the jsp as the attribute to your href.
nspils at 2007-11-11 22:39:44 >
# 2 Re: Downloading a word document using JSP
Thanks a mil! It's working in HTML!
Maria Modeste at 2007-11-11 22:40:44 >