Commonly used method of ServletResponse interface
1- setContentType(): Is used to specify MIME type of response. Content type is also known as MIME (Multipurpose internet mail extension) type. It is a HTTP header that provides the description about what are you sending to the browser. public void setContentType(String MIMEType); MIME type has 2 part: Major part represent type of content and miner part specify the format of content. Commonly used MIME types (content types) are: text/html image/gif audio/mp3 application/pdf text/xml image/jpg audio/wav application/msword text/plain image/bmp application/vnd.ms-excel application/jar ...