• Post Reply Bookmark Topic Watch Topic
  • New Topic

Possible Servlet Response Contents

 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I know that 90% of the times we send a HTML output from a servlet (text/html). But what all other content types can we send from a servlet (other than binady- application/pdf)? Pls. excuse if this question is too trivial.
Thanks,
Reema
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, pretty much anything as long as you set the content type headers appropriately. If the browser doesn't know how to deal with the content type, it will give the user the option to download the content.
 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that servlet can delivery data not only to browsers. Some people use servlets for delivering data to other requesters. Some people name that as web services.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!