Error in valueChangeListener
When i select an item, i get the following error.
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Exception while invoking expression #{Tester.listen}
javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
javax.faces.el.EvaluationException: Exception while invoking expression #{Tester.listen}
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:168)
javax.faces.component.UIInput.broadcast(UIInput.java:244)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:150)
org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Here is the JSP code
<f:view>
<h:form>
<h:selectOneListbox valueChangeListener="#{Tester.listen}"
size="7" required="yes" onchange="this.form.submit()">
<f:selectItem itemLabel="one" itemValue="1" />
<f:selectItem itemLabel="two" itemValue="2" />
<f:selectItem itemLabel="three" itemValue="3" />
<f:selectItem itemLabel="four" itemValue="4" />
</h:selectOneListbox>
</h:form>
</f:view>
And my Bean code:
public class Tester {
public Tester(){
}
public void lisen(ValueChangeEvent e){
System.out.println("hello world");
}
}
What went wrong in the code?

