На Tomcat 7 JSF 2.1.4 следующие работы
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<h:form>
<h:commandButton value="click 1"
action="#{test.var('a','b',1,test.i,test.d,test.s,test.ss)}"/>
<h:commandButton value="click 2"
action="#{test.var('a','b',1)}"/>
<h:commandButton value="click 3"
action="#{test.var(test.i,test.d,test.s,test.ss)}"/>
</h:form>
</body>
</html>
Боб:
@ManagedBean
public class Test {
private Integer i = 10;
private Double d = 10.0;
private String s = "varargs";
private String[] ss = new String[]{"1","2","3"};
public Integer getI() {
return i;
}
public void setI(Integer i) {
this.i = i;
}
public Double getD() {
return d;
}
public void setD(Double d) {
this.d = d;
}
public String getS() {
return s;
}
public void setS(String s) {
this.s = s;
}
public String[] getSs() {
return ss;
}
public void setSs(String[] ss) {
this.ss = ss;
}
public void var(Object...objects){
System.out.println(Arrays.toString(objects));
}
}
Вывод: по клику 1,2,3
[a, b, 1, 10, 10.0, varargs, [Ljava.lang.String; @ 4fa9cba5]
[a, b, 1]
[10, 10.0, varargs, [Ljava.lang.String; @ 26b923ee]
Это то, что вы ищете ... так как способ, которым вы пытаетесь вызвать вопрос, пуст.