Magazine
 
JSF

<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>

<servlet> element maps the “javax.faces.webapp.FacesServlet” servlet class to a symbolic name i.e. Faces Servlet is an alias for “javax.faces.webapp.FacesServlet” servlet . The FacesServlet servlet works as an engine for all JSF applications (handling of all JSF related requests, building component tree of the JSP page, accessing all JSP pages in the application, creating an Event object and passing it to any registered listener). So all requests that need FacesServlet processing must be directed to this servlet. So if we want to invoke this servlet with every request we have to do mapping in <servlet-mapping> element. This is done to map a particular URL pattern with the Faces servlet.According to this file, URL of every request must end with .jsf.

Running the application

Type “http://localhost:8080/JSFLoginApplication/login.jsf” URL in the address bar of your browser and hit enter.




 
Nov 2007 | Java Jazz Up | 46
 
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69   Download PDF