Pages

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-

Syntax

response.setcontentType("text/html");

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.