美好的一天。
我在Linux Centos上有一个VPS包含Tomcat 7.0.0和JDK 1.6.0.21-b06。 我已经安装了我的JSF 2.2应用程序(Mojarra 2.2.7和Primefaces 5.0)。 当我调用具有参数的ManagedBean方法时,会发生上述错误:
javax.servlet.ServletException: javax.el.MethodNotFoundException: /homepage.xhtml @181,72 action="#{areapubblicaBean.GotoAiuto('homepage')}": Method not found: areariserv.AreapubblicaBean@161ebfb.GotoAiuto()
javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
根本原因
javax.faces.el.MethodNotFoundException: javax.el.MethodNotFoundException: /homepage.xhtml @181,72 action="#{areapubblicaBean.GotoAiuto('homepage')}": Method not found: areariserv.AreapubblicaBean@161ebfb.GotoAiuto()
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
根本原因
javax.el.MethodNotFoundException: /homepage.xhtml @181,72 action="#{areapubblicaBean.GotoAiuto('homepage')}": Method not found: areariserv.AreapubblicaBean@161ebfb.GotoAiuto()
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:109)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
当我使用Tomcat 7.0.54和JDK 1.7.0_25在我的PC环境中开发应用程序时,都运行正常。
为什么会这样?
祝福和好工作。
Stefano Errani
答案 0 :(得分:0)
将您的方法名称从GotoAiuto更改为doAction(passedString)
public void doAction(String param){
System.out.println(param);
}
并测试。
答案 1 :(得分:0)
我尝试过同样的结果。 当我点击buttom时出现错误。
它可能依赖于Java版本(vps中为6,我的电脑中为7)?
最好的问候。
Stefano Errani