Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

set content type  RSS feed

 
Pavan Kashyap
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
res.setContentType("application/download");

if this is set, will the download dialog popup?
 
Senthil S Kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to set the header as :


Note that the HTTP response headers must be set before any data is written to the servlet output stream.
[ September 07, 2006: Message edited by: Senthil S Kumar ]
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The download popup screen will display not only for the type download, but for any type that a browser isn't configured to recognize.

But it looks good. The browser should try to download it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!