• Register
0 votes

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?

6 5 3
7,540 points

Please log in or register to answer this question.

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.

9 7 4
38,600 points

Related questions

0 votes
1 answer 74 views
Problem : I want to insert Javascript to the <h:commandButton />'s onclick property as the action is already rendering the ajax table. What I want to do is to get a selected items in the list box and turn them into the parameters to be used in the JSF FileServlet. i.e. para2=value1&param= ... ) or even the for (var i = 0; i < 10; i++) my page wouldn't load. How can I fix my for loop issue?
asked Jan 20, 2020 jwilliam 3.9k points
0 votes
1 answer 267 views
Problem : Currently I am trying to learn the Apache Maven. I have tried to write below code in Eclipse but it is giving below error to me: Error Message: &ldquo;No grammar constraints (DTD or XML Schema) referenced in the document&rdquo; My Code : <project xmlns="http:// ... > <version>3.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins>
asked Feb 27, 2020 mphil 2.3k points
1 vote
1 answer 83 views
Problem: I am very new to Web.xml coding. Currently I am facing serious problem because of my web.xml file. If I try to run my Apache tomcat 8 server then every time it shows me below error: Server tomcat v8.0 server at localhost failed to start. in eclipse. If I ... . This error made my life like the hell. So I am looking for the help from web.xml expert who can help me in fixing my problem.
asked May 18, 2020 Martin K 6.6k points
0 votes
1 answer 41 views
0 votes
1 answer 148 views
Problem : In my current application I want to get the MS-Word and PDF files through the Storage Access Framework which works well on some of the devices I have worked upon however on the Samsung note 4 API 6 I am facing following error : All apps ... "application/pdf,application/msword"); Intent i = Intent.createChooser(intent, "File"); getActivity().startActivityForResult(i, FILE_REQ_CODE); } });
asked Dec 6, 2019 alecxe 7.5k points
0 votes
1 answer 21 views
Problem: I have an XML file songs.xml as partially shown below: <?xml version="1.0" encoding="utf-8"?> <Event status="happened"> <Song title="Erase and rewind"> <Artist name="The Cardigans" ID="340900"> </Artist> <Info StartTime="22:22:13" JazlerID="8310" PlayListerID="" /> </Song> </Event> I need to parse such file and get all the fields like: Song Title: Artist: Start Time: ID:
asked Jan 10 Mashhoodch 5.7k points
0 votes
1 answer 9 views
I am beginner in SOAP request and response. We are running a project where our client has provided us their WSDL file. Specially they need an attribute which accepts multiple values.
asked Sep 28, 2020 Daniel Anderson 4k points
0 votes
1 answer 9 views
I am trying to display xml data in html page applying JavaScript but some cases i am finding difficulty.
asked Sep 25, 2020 Daniel Anderson 4k points
0 votes
1 answer 7 views
Can anyone help me in some interview questions all related to XML thanks!!
asked Dec 10, 2020 Lucky Guy 930 points
0 votes
1 answer 174 views
Problem : My blog feed showing me following error today: This page contains the following errors: error on line 2 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error
asked Dec 6, 2019 alecxe 7.5k points