Discussion Locked

Discover mimeType

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Do you think this is a better way to discover the MIME type of returning content from a servlet or jsp page?

3 replies

by avia

Thankyou very much. I was unaware of FileNameMap interface. It looks like it will be very handy. I haven't done much work with servlets, but I was wondering where I could find such a mapping between MIME types and file types. Now I have found one. Thanks people!

Avi.

by tran_phong

Now I know another alternative for getting Mime Type for a file name in addition to ServletContext.getMimeType() method. This alternative could be very handy when you don't have access to ServletContext or running in Servlet container environment. I'm looking forward to more tips like this. Thanks.

This discussion is closed to new replies.