convert JSP to Word document
843836Aug 6 2004 — edited Jan 7 2005Is 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.