title: JSF <h:inputText> value does not update the bean property
body: <p>So I'm very new to JSF, I just started using it a few days ago and I'm trying to learn off of youtube tutorials and a couple of books. But I can't tell why this isn't working. Here's my code:</p>
  
  <pre><code>    &lt;h:form styleClass="formStyle"&gt;
          &lt;h1&gt;Log In&lt;/h1&gt;
          &lt;fieldset id="inputs"&gt;
              &lt;h:inputText id="username" type="text"  value="#{redirectBean.name}"&gt;
              &lt;/h:inputText&gt;
              &lt;h:inputSecret id="password" type="password"  value="#{redirectBean.password}"&gt;
              &lt;/h:inputSecret&gt;
          &lt;/fieldset&gt;
          &lt;fieldset id="actions"&gt;
              &lt;h:button type="submit" styleClass="test" value="Log in" outcome="#{redirectBean.login}"&gt;
              &lt;/h:button&gt;
          &lt;/fieldset&gt;
      &lt;/h:form&gt;
  </code></pre>
  
  <p>redirectBean.java is simply a class containing 3 private strings (login="welcome", name and password) and their getters/setters.</p>
  
  <p>Upon clicking the Login button I am redirected to welcome.xhtml but there are no changes made to redirectBean.name or redirectBean.password. </p>
  
  <p>Any thoughts? What am I missing?</p>
  
  <p>Edit: so BalusC has explained that I need to use h:commandButton instead, but that wasn't redirecting me. After some back-and-forth trying to figure out why, this is the server log I'm currently getting (It's redirecting me now with the command button but still not passing the value to the bean. I also got something about RI and MyFaces conflicting, but some tinkering in the classpath seems to have fixed that):</p>
  
  <pre><code>SEVERE: ContainerBase.addChild: start: 
  org.apache.catalina.LifecycleException:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener     at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:5332)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:498)   at
  org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
      at
  org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      at
  org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
      at
  com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
      at
  com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
      at
  com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at
  org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at
  org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      at
  com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at
  com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at
  com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at
  com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at
  com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at
  com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at
  com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at
  com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at
  com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at
  com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
  com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at
  com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662) Caused by:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener     at
  org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2743)
      at
  org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:1966)
      at
  com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:235)
      at
  com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:94)
      at
  com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:274)
      at
  com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:172)
      at
  org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:149)
      at
  org.apache.catalina.core.StandardContext.start(StandardContext.java:5329)
      ... 39 more Caused by: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener     at
  org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
      at
  org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
      at
  org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:4806)
      at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1599)
      at
  org.apache.catalina.core.StandardContext.addListener(StandardContext.java:2740)
      ... 46 more
  
  WARNING: java.lang.IllegalStateException: ContainerBase.addChild:
  start: org.apache.catalina.LifecycleException:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener
  java.lang.IllegalStateException: ContainerBase.addChild: start:
  org.apache.catalina.LifecycleException:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener     at
  org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
      at
  org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
      at
  org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
      at
  com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
      at
  com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
      at
  com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at
  org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at
  org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      at
  com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at
  com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at
  com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at
  com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at
  com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at
  com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at
  com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at
  com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at
  com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at
  com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
  com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at
  com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)
  
  SEVERE: Exception while invoking class
  com.sun.enterprise.web.WebApplication start method
  java.lang.Exception: java.lang.IllegalStateException:
  ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener     at
  com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at
  org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
      at
  com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at
  org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
      at
  com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
      at
  com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      at
  com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at
  com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
      at
  com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at
  com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      at
  com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      at
  com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      at
  com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      at
  com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at
  com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at
  com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at
  com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at
  com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
  com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at
  com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)
  
  SEVERE: Exception while loading the app SEVERE: Exception while
  loading the app : java.lang.IllegalStateException:
  ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
  java.lang.IllegalArgumentException: java.lang.ClassNotFoundException:
  org.apache.myfaces.webapp.StartupServletContextListener
  </code></pre>