Problem

Since JSF 2.0, you are allow to pass parameter values in method expression like “#{bean.method(param)}“, but this feature is keep raising a “EL parsing error” in Tomcat server. For example,

1. Managed Bean

@ManagedBean(name="order")
@SessionScoped
public class OrderBean implements Serializable{
 
	public String editAction(String id) {
		//...
	}
}

2. JSF page

//...
<h:commandLink value="Edit" action="#{order.editAction(123)}" />
//...

3. Parsing error
It will hits the following EL parsing error message :

 
An Error Occurred:
Error Parsing: #{order.editAction(123)}

Solution

Actually, this so call “method expression parameters” are a feature of EL 2.2, which is not support in Tomcat by default. In order to use this feature, you have to get “el-impl-2.2.jar” from Java.net, and put it into your project dependencies folder.

pom.xml

     <dependency>
	  <groupId>org.glassfish.web</groupId>
	  <artifactId>el-impl</artifactId>
	  <version>2.2</version>
     </dependency>

Done, now your JSF 2.0 web application is supported the method expression parameters feature in Tomcat server.

Note : You can find more similar articles at - JSF 2 Tutorials