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

Saving a file on the client's machine

 
prabhakar pullela
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Save a file at the client place using JSP.

[BPSouther: Added meaningful subject line]
[ March 15, 2007: Message edited by: Ben Souther ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some advice: you'll get a better response if you use a meaningful subject line. Also, in order that those for whom English is not their first language have a better chance of understanding what is posted in these forums, we ask that you refrain from using words that are not recognized English, such as "plzzzzzzzzzz". Also, you might benefit from reading this.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In short, you can't.
Browsers, for security reasons, don't allow this.

What you can do, is set the Content-Type and Content-Disposition headers in such a way that the browser will prompt the user with a "Save As" dialog box.

See our JspAndExcel entry in the JSP FAQ page for an example that does this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic