0 Replies Latest reply on Nov 9, 2005 7:03 PM by kendee

    add xsl mime type on jboss2.4.4-tomcat3

    kendee

      Hi,
      I have a servlet that return xml content to the browser and have a xsl stylesheet. The xml content is displayed nicely under Internet Explorer, but on Mozilla browser I get this error:
      "Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:"
      (I am using jboss2.4.4-Tomcat3.)
      So, I've added the mimetypes on /tomcat/conf/web.xml these entries:
      <mime-mapping>
      xml
      <mime-type>
      application/xml
      </mime-type>
      </mime-mapping>
      <mime-mapping>
      xsl
      <mime-type>
      application/xml
      </mime-type>
      </mime-mapping>
      <mime-mapping>
      xslt
      <mime-type>text/xslt</mime-type>
      </mime-mapping>
      as suggested by some discussion I read, since I get it work on mozilla locally from an xml file.

      My xml generated has this header:
      <?xml version="1.0" encoding="ISO-8859-1" ?><?xml-stylesheet type="text/xsl" href="document.xsl"?>

      My xsl stylesheet has this header:
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

      Anyone has any idea?