Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2808
  • Last Modified:

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".
0
KirtipurItagol
Asked:
KirtipurItagol
  • 3
  • 3
  • 2
  • +2
5 Solutions
 
suprapto45Commented:
Hi,

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

It should run your word document editor automatically.

David
0
 
KirtipurItagolAuthor Commented:
Dave, that's not working...any other options on hand??
0
 
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??
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
suprapto45Commented:
Hi,

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

David
0
 
KirtipurItagolAuthor Commented:
yes it is displaying properly!!
0
 
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
0
 
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
0
 
KuldeepchaturvediCommented:
if you type the location of doc directly in a new browser how it responds??
0
 
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
0
 
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now