You need to make sure that the ui:
XML namespace is declared in any parent element as follows:
<anyelement ... xmlns:ui="http://java.sun.com/jsf/facelets">
You also need to make sure that the FacesServlet
is in webapp's web.xml
being mapped on an URL pattern of *.xhtml
, given that you attempted to open it directly on /login.xhtml
.
<servlet-mapping>
<servlet-name>facesServlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
The FacesServlet
is namely the one responsible for among others parsing that XHTML document and producing the HTML output based on it.