Programmers learn & share
0 votes
58 views

Problem  :

I want to run the Eclipse JSF project on the Apache Tomcat on some other computer. I created the WAR file. But, when I try to deploy the WAR and open my Facelet page in Firefox, I usually face only the below error message:

“This XML file does not appear to have any style information associated with it. The document tree is shown below.”

This is my very first time when I am trying to run the JSF app without my Eclipse. How is this issue popping up and how can I fix the issue?

by (7.5k points)   | 58 views

1 Answer

0 votes

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.

by (36.1k points)  
2,218 questions
2,683 answers
59 comments
241 users