Has anyone tried running JSF2 on
Tomcat 6? I tried to do this but running into EL compatibility issues. Tried various combinations but nothing worked. I did the setup and
test based on the following post.
http://weblogs.java.net/blog/cayhorstmann/archive/2009/12/29/jsf-20-and-tomcat
If anyone accomplished this, please post the following
1) list of libraries in tomcat lib
2) list of libraries in WEB-INF/lib
3) web.xml configuration
I have the following config and my sample page only displays plain HTML but not any
JSF text box fields.
I added the following to tomcat lib
el-api-2.2.jar
el-impl-2.2.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
I have the following in WEB-INF/lib
jsf-api.jar
jsf-impl.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
weld-servlet.jar
My web.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5">
<display-name>JsfTest</display-name>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
<listener>
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
</listener>
<
servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
I also have an empty beans.xml in my WEB-INF folder. This is required for Weld.
Anyone, please help.