JSF 2.3.3 jar-错误消息JSP.2.3.4在这种情况下不允许使用文字值

时间:2019-03-11 13:06:04

标签: jsf jsf-2.2

我正在将myfaces jar从1.1.5更新到2.3.3(myfaces-impl-2.3.3和myfaces-api-2.3.3),并且旧的jsp页面抛出以下错误。这在新的myfaces 2.3.3版本中不起作用吗?是否还有其他需要更新的jar?解决此问题需要进行哪些更改?

  

为属性actionListener指定了一个文字值,即   定义为返回类型为void的延迟方法。 JSP.2.3.4   在这种情况下不允许字面值

  <h:commandLink  actionListener="#{MyBean.testmethod}" action="testmethod" >
                    <h:outputText value="exit" />
   </h:commandLink> 

class MyBean{

    public void testmethod(ActionEvent ae){
        System.out.println("calling test method");
    }   

}

0 个答案:

没有答案