The moose likes Servlets and the fly likes How to render documents on to Pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to render documents on to Pages" Watch "How to render documents on to Pages" New topic

How to render documents on to Pages

Swaroop Kunduru
Ranch Hand

Joined: May 22, 2006
Posts: 37
Hello All,

I have to render documents on to webpages for server. When user click a document link it should popup on a window. The document type may be a word file or a pdf or an image.

The documents will be in the Database as Blobs.

Please give me clues to render them on to browser and Word docs should be editable.

The Database is Oracle, at Server we where using Hibernate and Spring Framework. At UI We where using struts1.2

The user may not have word editor.

Please give me a clue how to start.


Swaroop Kunduru.

Swaroop Kunduru
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

I feel you may get better answers in Servlet forum. Moving ....

apigee, a better way to API!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
You can find an example of how to stream binary content (like a PDF or Word file) from a servlet in the Simple Stream example in the Code Barn,

What happens at the client -whether the file is displayed, or saved to disk- depends on browser settings, and on user behavior; it's out of the hands of the web app.

If the user has neither Word or OpenOffice, then the user won't be able to edit Word files; there are browser plugins that can display such files, though.
I agree. Here's the link:
subject: How to render documents on to Pages
It's not a secret anymore!