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
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.
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.