To confirm all UTF-8 characters added to the 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 the browser refuses to load its css with an error in the browser as.
Resource interpreted as Stylesheet but transferred with MIME type text/html:
But the above works in jboss 6 I tried to install
<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 standalone-full.xml, but this does not work. How to automatically identify file content types?
happy source
share