i have read in the servlet spec that mime-mapping element is used to map an mime-type to an extension. but can someone please tell the need to use this element. give me one real scenario when it would be required to add this element to the deployment descriptor.
Not sure if you totaly agree with me but this could be one of the scenarios that i faced before.
Mime-type is sent in the header by the webserver to tell the browser how to handle the reponse. On the webservers we had an entry xls and the application type was ofcourse microsoft excel. Now if you have multiple web applications on deployed on the same server and you just want you application to open the xls file with open office then changing the entry on the webserver will cause issues as it will affect other application too. Defining them in the web.xml file is local to your application only.
cheers skini [ July 22, 2004: Message edited by: Shailesh Kini a.k.a SKini ]