MIME Types in Servlet API

T

T. Berger

Hi,

the Servlet API (2.3 in my case) provides the method
public String getMimeType(String file)
which returns the MIME-Type by analyzing the file extension. The problem
is that I need the opposite way, that means getting the extensions to a
specific MIME-Type.
Of course, I could parse my own mime mappings, but I'd like to use those
already provided in Tomcat's web.xml. Is there any way to do this API
conform? I didn't find any methods...

Thanks
Thorsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top