File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Creating Dynamic Content (excel/word/pdf fromat) using jsp/servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Creating Dynamic Content (excel/word/pdf fromat) using jsp/servlets" Watch "Creating Dynamic Content (excel/word/pdf fromat) using jsp/servlets" New topic

Creating Dynamic Content (excel/word/pdf fromat) using jsp/servlets


Joined: Jul 20, 2001
Posts: 1
I need to Create Dynamic Web Page Content from my Server Side coding and has to show it on the clients screen in any of the following desired formats(EXCEL/WORD/PDF).
Eg: After getting the user inputs the content has to be generated dynamically and shown to the user on screen.
1.If the results to be displayed as a Bar/Pie chart , the content should be showed on Excel/ Word's Chart Using its Object.
2.If the results ha s to be shown as Table means we need to create a Table Dynamically in WORD And Show on the Screen.
Basically i need to get access to the EXCEL/WPRD/PDF Objects thro my JSP/Servlets.
I Need a soluton to this problem.
If anyone has a solution ple mail me at
Julia Reynolds
Ranch Hand

Joined: May 31, 2001
Posts: 123
It sounds like a job for xml and xslt. I think there are
some xslt tutorial links here a JavaRanch. Also, check out the Java and XML presentation materials at this page:
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
You need to look into the way HTML can be labeled with Content-Type: settings. Any servlets book (such as mine, hint hint) will have information on serving up various sorts of non-html content such as the formats you mention.
The main points are:
1. Getting the Content-Type: right
2. Setting the Content-Length: is often essential
3. Output using the plain OutputStream - NOT a PrintWriter

author of:
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: Creating Dynamic Content (excel/word/pdf fromat) using jsp/servlets
It's not a secret anymore!