Servlet Content Type

Content Type

Also known as MIME Type, Content type’s MIME is short form of Multipurpose Internet Mail Extension. It works a HTTP header that includes various information about page like description of the package media (Images, text, video and so on)
It is sent as a HTTP protocol and exchanges response package to client.
Example: Suppose you send html text based file as a response to the client the MIME type specification-


There are two part of MIME Type :-:
  • Base name
  • Extension name
Base name: It is a genetic or we can say pre defined file file name.
Extension name: Extension name is name of files with specific extensions.
Following are supported Content Type by MIME
FileMIME TypeExtension
Plaintext Filetext/plain..txt.
gif Imageimage/gif..gif.
JPEG Imageimage/jpeg..jpeg.
PNG Imageimage/x-png..png.
MP3 Music Fileaudio/mpeg..mp3.
MS Word Documentapplication/msword..doc.
Excel work sheetapplication/
Power Point Documentapplication/