JSF 2 + CDI



Maven
  • JEE6 - Web Profile
    • javaee-web-api-6.0.jar
    • jstl-1.1 (JSTL)
    • standard-1.1 (TagLibs)
  • JSF 2.0
    • jsf-impl-2.1
      • jsf-api-2.1
    • primefaces-3.2.jar
  • CDI 1.0
    • weld-servlet-1.1
      • cdi-api-1.0.jar
      • javax.inject-1.jar
      • jsr250-api-1.0.jar
      • jboss-interceptor-api-1.1.jar
    • weld-servlet-core-1.1.6.Final.jar
WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
    
    <listener>
        <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
    </listener>
</web-app>






http://weblogs.java.net/blog/cayhorstmann/archive/2009/12/29/jsf-20-and-tomcat

Comments