MIME stands for Multipurpose Internet Mail Extension. The MIME type is an HTTP header that gives information about what we’re sending to a browser. It helps the client in data rendering. Common MIME types are text (HTML), text (plain), images (jpeg), application (jar), etc.
To get the correct MIME type of a particular file, you can use the ServletContext getMimeType()
method. It comes in handy while downloading a file through servlets from a server.