eclipse – Opening JSF Facelets page shows This XML file does not appear to have any style information associated with it.

eclipse – Opening JSF Facelets page shows This XML file does not appear to have any style information associated with it.

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

You will get this message in the client side when the client (the web browser) for some reason interprets the HTTP response content representing a HTML document as text/xml instead of text/html and the parsed XML tree doesnt have any XML-stylesheet. In other words, the web browser parsed the retrieved HTTP response content as XML instead of as HTML due to a missing or incorrect HTTP response content type.

In case of JSF/Facelets files which have the default extension of .xhtml, that can in turn happen if the HTTP request hasnt invoked the FacesServlet and thus it wasnt able to parse the Facelets file and generate the desired HTML output based on the XHTML source code. Firefox is then merely guessing the HTTP response content type based on the .xhtml file extension which is in your Firefox configuration apparently by default interpreted as text/xml.

You need to make sure that the HTTP request URL, as you see in browsers address bar, matches the <url-pattern> of the FacesServlet as registered in webapps web.xml, so that it will be invoked and be able to generate the desired HTML output based on the XHTML source code. If its for example *.jsf, then you need to open the page by /some.jsf instead of /some.xhtml. Alternatively, you can also just change the <url-pattern> to *.xhtml. This way you never need to fiddle with virtual URLs.

See also:


Note thus that you dont actually need a XML stylesheet. In your specific case it was just a misinterpretation from the webbrowser while trying to do its best to make something presentable out of the retrieved HTTP response content.

Add xmlns=http://www.w3.org/2000/svg atrribute to the begining of the svg tag like this: <svg xmlns=http://www.w3.org/2000/svg

eclipse – Opening JSF Facelets page shows This XML file does not appear to have any style information associated with it.

Leave a Reply

Your email address will not be published.