I have the following HTML file:
That can happen if the request URL as you see in browser's address did not match the
of the FacesServlet
as definied in webapp's web.xml
and hence the FacesServlet
wasn't able to do its job of performing all the JSF works.
If you right click the page in browser and do View Source, you should have noticed that the JSF
tag is completely unprocessed. JSF tags aren't recognized by the webbrowser. They are supposed to be processed by the FacesServlet
in the webserver. They are supposed to generate proper HTML code and the final HTML result should not contain any JSF tags at all.
You need to make sure that the request URL as you see in browser's address matches the
of the FacesServlet
as definied in webapp's web.xml
. Imagine that it is *.jsf
like as
*.jsf
then you should need to change the URL in the address bar from /some.xhtml to /some.jsf.
Alternatively, you could also just change the web.xml
to map the FacesServlet
on *.xhtml
directly
*.xhtml
so that you don't need to fiddle with virtual URLs anymore.
As to the file having HTML5 doctype, no that makes absolutely no difference. I'd only remove that XML prolog as that's valid for XHTML doctype only. See also Is it possible to use JSF+Facelets with HTML 4/5?