• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to open word and pdf document in the browser

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friend,

Could any one please suggest a way of opening/viewing a word file or a pdf file in the browser. I am using JBoss 4 server and struts 1.2

The file can be opened in 2 ways:

1. Display the file name on the jsp page as a hyper link. On clicking the link the appropriate file should be opened for reading in the same browser.

2. There would be a radio button against the file name and a "View" submit button. Selecting the file by checking the radio button and clicking on the "View" button should open the file in the browser.

Please help.
 
author & internet detective
Posts: 42055
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bonny,
While either approach is fine, I always prefer an approach that shows the user what type of file they will be getting upon clicking. In this case, it sounds like #2.

Note that whether it opens in the browser is dependent on the user's configuration. For example, I have .doc files set to prompt for download on my computer.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone Please help with a code snappet to open an MsWord using struts framework.

Thanks in advance.

Regards,

Swaroop Kunduru.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Struts is server-side library, while documents tend to be opened on the client; what are you trying to do - stream the document to the client?
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic