• Post Reply Bookmark Topic Watch Topic
  • New Topic

mime type in web.xml

 
geofrey pony
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the content type can be set in the header of the response why do we have to set the mime types in web.xml? So, for example if I want to render a pdf file to the browser I set the content type in the response header to "application/pdf". Do I also have to mention that in web.xml? Or is it enough if I set it in the response header?

What exactly are we acheiving or trying to acheive by setting mime types in web.xml?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default servlet uses these to set the the mime types for static resources.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!