Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert JSP to Word document

843836Aug 6 2004 — edited Jan 7 2005
Is there a way to render a jsp file to a word document and display on the browser or prompt for the user to save the file in word?

I currently have a report page (jsp file) which the user wants to be able to save as a word document. I tried this:

response.setContentType("application/msword");

But it end up displaying the exact content of the html text in a word container?! Meaning I see the <table><tr>...... in the display in a word container.

I tried this also:

response.setContentType("application/x-msword");

this end up with the system display a prompt to save the file. I save the file in .doc, but when I openup the file I see <table><tr>..... also.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2005
Added on Aug 6 2004
19 comments
1,995 views