0

Im having JSF project in which i have xhtml pages. and my web.xml looks like below

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet>

Now when i hit the page like login.jsf, then it correctly loads login.xhtml. how does this happens ? Is this handled by FacesServlet ?

My another question is , Is FacesServlet and Facelets are same or different ? If different then what does Facelets means ?

Mohamed Uvais M
  • 185
  • 1
  • 2
  • 14

1 Answers1

0

Faces servlet process all requests based on a define url-pattern redirecting these requests to JSF lifecycle.

Facelets is a templating framework that provides a XML based language to declare and compose view componentes in JSF.

Take a look at:

https://docs.oracle.com/javaee/7/api/javax/faces/webapp/FacesServlet.html http://www.oracle.com/technetwork/articles/java/facelets-454361.html

Leonardo Cruz
  • 1,189
  • 9
  • 16