Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Saving JSP output to a File with extension .xls

 
peter brews
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have tp save the JSP output to a file. I have set the header to response.setContentType(application/ms-excel). I get a dialog box for the output. Save/Open when I hit Open it opens up the output in Excel. But when I click Save it asks me for a file name and the name it displays in a .jsp file and the user manually have to change the name to .xls file while saving.
IS there a way where If I click save instead of the .jsp as the filename it is displayed as a .xls file in the file dialogue box.
Thanks
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a little HTTP trick to do what you want:

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic