How can I make JSF send http header
Content-Type: application/xhtml+xml;charset=UTF-8
instead of current
Content-Type: text/html;charset=UTF-8
?
Adding following snippet in web.xml
had no effect.
<mime-mapping>
<extension>xhtml</extension>
<mime-type>application/xhtml+xml</mime-type>
</mime-mapping>
My sample file webapp/sample.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<f:view>
<h:outputLabel value="Hello, world"/>
</f:view>
</html>
Environment:
JSF 2.2, WildFly 8.2