3 Replies Latest reply on Jun 17, 2009 10:02 AM by aeroju

    Setting KML / KMZ Mime Types in JBoss 5.0

    mduffy

      We are hosting our application on JBoss 5.0

      We have KML and KMX download files for Google Earth. Everything works fine when a user is using the Firefox browser; however, with Internet Explorer the KML files are downloaded into the web page as text/xml and the KMZ files are downloaded as zip files.

      Apparently, we need to set the appropriate mime types in JBoss. I am not sure where they go, but I think the values are:

      AddType application/vnd.google-earth.kml+xml kml
      AddType application/vnd.google-earth.kmz kmz

      A solution would be greatly appreciated.

      Mike


        • 1. Re: Setting KML / KMZ Mime Types in JBoss 5.0
          peterj

          Look near the end of the file server/xxx/deployers/jbossweb.deployer/web.xml

          • 2. Re: Setting KML / KMZ Mime Types in JBoss 5.0
            mduffy

            Thx Peter.

            This worked perfectly.

            I added the following to the web.xml in /opt/jboss-5.0.0.GA/server/default/deployers/jbossweb.deployer

            <mime-mapping>
            kml
            <mime-type>application/vnd.google-earth.kml+xml</mime-type>
            </mime-mapping>
            <mime-mapping>
            kmz
            <mime-type>application/vnd.google-earth.kmz kmz</mime-type>
            </mime-mapping>

            As a suggestion, I think this should be added to future releases of JBoss.

            Mike

            • 3. Re: Setting KML / KMZ Mime Types in JBoss 5.0

              Hi, Mike,

              I also meet this problem, and after I add following:

              <mime-mapping>
              kml
              <mime-type>application/vnd.google-earth.kml+xml</mime-type>
              </mime-mapping>

              both google map and google earth could not open the KML file on my server, and after I change it to:

              <mime-mapping>
              kml
              <mime-type>text/plain</mime-type>
              </mime-mapping>

              google earth could open it, but google map could not, is there any other setup required?

              Thanks,