Solution :
In case of your JSF/Facelets files which have a default extension of .xhtml
, that can usually happen if your HTTP request hasn't invoked your FacesServlet
and so it was unable to parse your Facelets file and unable to generate the required HTML output based on your XHTML source code. The Firefox is then merely trying to guess your HTTP response content type depending on your .xhtml
file extension which is in the Firefox configuration usually by default interpreted as the text/xml
.
So you will need to make sure that your HTTP request URL, as you can see in browser's address bar, matches your <url-pattern>
of your FacesServlet
as you have registered in the webapp's web.xml
, so that it will be able to invoked and be able to generate your desired HTML output based on your XHTML source code.