Cay Horstmann has a really good blog entry on JSF 2.0 and Tomcat. It is from a couple of years ago though.
I thought that I would add a little more information to well of knowledge. I have JSF 2.1.1-b04 running on Tomcat 6.0.32 with the addition of new EL (Expression Language) libraries and a context parameter to the web.xml
pom.xml
<dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId> <version>2.2.1-b04</version> </dependency> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>el-impl</artifactId> <version>2.2.1-b05</version> </dependency>
web.xml
<context-param> <param-name>com.sun.faces.expressionFactory</param-name> <param-value>com.sun.el.ExpressionFactoryImpl</param-value> </context-param>
These minor additions allow you to take full advantage of JSF 2.1.x EL syntax. This includes the capability to include parameters to your EL methods such as the action in the
h:commandButton below:<h:form id="form1"> <h:inputText id="inputText1" value="#{indexBean.message}"/> <h:commandButton id="commandButton1" type="submit" value="Submit" action="#{indexBean.someAction(value)}"/> </h:form>
3 comments:
Post a Comment