title: Why commandButton actionListener doesn't work?
body: <p>I have the following code in the <code>login.xhtml</code>:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"
   xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
       xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:head&gt;&lt;title&gt;Login&lt;/title&gt;&lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;h:form&gt;
          &lt;p:commandButton id="loginBtn"  value="Login" type="submit" actionListener="#{userMB.login}"/&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And I have I have the following bean:</p>
  
  <pre><code>@ManagedBean(name="userMB")
  @RequestScoped
  public class UsersManagedBean implements Serializable {
      public void login(ActionEvent event) {
          System.out.println("print here...");
      }
  }
  </code></pre>
  
  <p>I don't get the message printed because the <code>login()</code> method hasn't been invoked. Is there anything wrong?</p>
  
  <p>The web.xml file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     id="WebApp_ID"
     version="2.5"&gt;    
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
      &lt;param-value&gt;client&lt;/param-value&gt;
  &lt;/context-param&gt;
   &lt;servlet&gt;
       &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
       &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
       &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
     &lt;/servlet&gt;
   &lt;servlet-mapping&gt;
       &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
       &lt;url-pattern&gt; *.xhtml&lt;/url-pattern&gt;
     &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>