0 Replies Latest reply on Aug 19, 2017 10:05 AM by Happy Singh

    Auto identify mime types in wildfly10

    Happy Singh Newbie

      To suppport all UTF-8 characters we have added in Servlet filter

      servletResponse.setContentType("text/html; charset=" + "UTF-8"); servletRequest.setCharacterEncoding(servletResponse.getCharacterEncoding()); 

      because of this it sets the content type as "text\html" for all file types and for css also and browser denies to load it css with error on browser as.

      Resource interpreted as Stylesheet but transferred with MIME type text/html: 

      But above works in jboss 6 I tried setting

      <servlet-container name="default"> <jsp-config mapped-file="false" development="true"/> <websockets/> <mime-mappings> <mime-mapping name="css" value="text/css"/> <mime-mapping name="msi" value="application/x-msi"/> </mime-mappings> </servlet-container> 

      in the standalone-full.xml but this does not work. How does it automatically identify the file content types?