Interface/enum listing standard mime-type constants

前端 未结 11 2024
-上瘾入骨i
-上瘾入骨i 2020-12-13 11:35

I am looking among the standard libraries (like apache commons, jax, jboss, javax) for an interface or enum that lists the values of all the standard mime-type (aka content-

11条回答
  •  没有蜡笔的小新
    2020-12-13 12:01

    As already posted in earlier answer, most common MIME types are configured in a webserver. For example in tomcat conf/ we have web.xml with following MIME configured:

       
          abs
          audio/x-mpeg
       
       
          ai
          application/postscript
       
       
          aif
          audio/x-aiff
       
    ...
    

    Create a startup listener that kicks in when web app is started and parses this XML file and creates the ENUMS for you and binds it to servlet context for sharing downstream.

提交回复
热议问题