Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Save a JSP page as Word document

 
Pallavi Roy
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have .jsp page with some generated content. In that page, there is a button as "save as word". When the link is clicked , i need the save dialog to appear and prompt the user to save the content in the JSP page as word document.How can i do this in JSP.
Please guide me in this regard.

Thanks & Regards,
Pallavi
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the page has been sent to the broswer, the fact that it was a JSP is moot.

When the button is clicked, a new request will be sent to the server. In this request, a servlet should be called that takes the same data as was sent to the JSP and format it as an RTF document (which is a lot easier to generate than a native Word document).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic