When i run the application i get following error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
JSF doesn't work with HTML (or xhtml). It works with JSF View templates. Depending on how things are set up, JSF may generate HTML or XHTML, but one of the advantages of JSF is that the renderers are plug-replaceable components. You could just as easily render a PDF.
The confusion here is because ".xhtml" is the popular file extension for Facelets templates, but Facelets templates aren't (X)HTML, they're JSF XML.
The Facelets renderer is generating an XHTML doctype and you're providing one manually, and that's one more DOCTYPE than the web browser wants to see.
Bjoke: A "Bully Joke". A Statement or action made with malicious intent - unless challenged. At which point it magically transforms into "I was just funnin'" or "What's the matter, can't take a joke?"