How to open a word document using JSP?

Hi experts, I have a JSP page which has a link. As soon as user clicks the link, a word document linked with that link should open up. Is there any way to do this?
Thanks
Right now I'm doing  something like :
href ="location of the word document".
KirtipurItagolAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

suprapto45Commented:
Hi,

If you specify something like
<a href="your doc location" target="_blank">...</a>

It should run your word document editor automatically.

David
KirtipurItagolAuthor Commented:
Dave, that's not working...any other options on hand??
KirtipurItagolAuthor Commented:
actually Dave, it's opening the word document but it is not displaying properly. I get something like [][]#% like that...do i need to set something up so that it will display the fonts correctly??
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

suprapto45Commented:
Hi,

If you try to open it using Word manually, is it displaying properly?

David
KirtipurItagolAuthor Commented:
yes it is displaying properly!!
suprapto45Commented:
That's weird.

Are you sure that the location is correct? Maybe if possible, you can send me the email document to my email. If so, I will provide you with my email address later on.

David
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
<a href="doc location" type="Content-Type: application/msword; " target="_blank">link</a>

this may work else there is one way using java script but the problem is it works only for IE i believe.

check out here is the link.

http://p2p.wrox.com/topic.asp?TOPIC_ID=17029

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KuldeepchaturvediCommented:
if you type the location of doc directly in a new browser how it responds??
fargoCommented:
Hi,

take a look here

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21777975.html

you may need to use a servlet to handle the download. Change the content-type to application/ms-word.

fargo
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
<a href="doc location" type="Content-Type: application/msword; " >link</a>

i think this will do.
just try & tell.
bye
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.