• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting response header through Javascript

 
Ramesh Bhagasra
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
I have to show a file to the client using the browser, I have the file contents stored in my Blob Field in the Database. Now I want to display the file on clilck of a button called DOWNLOAD and then determine the type of file, correspondingly setting the contentType and setHeader of response object. How can i do that??? Please help me at ur earliest...
Thanx
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your "Download" button will have to create a request to a servlet - not a JSP - because JSP are designed only to serve characters. This kind of question comes up all the time - browsing around in the servlet and JSP forums or doing a search will get you lots of hits. Or you could even buy a book.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic