title: JSF property not found on managed bean
body: <p>I'm trying to create a menaged bean in my JSF application.</p>
  
  <p>I'm not sure whether it is related to my problem but I use primefaces 4.0 and some themes of that. I added all jar files that I need with maven.</p>
  
  <p>Primefaces uses managed beans for theme but it works well.</p>
  
  <p>Here is my bean : </p>
  
  <pre class="lang-java prettyprint-override"><code>package Beans;
  
  @ManagedBean
  @SessionScoped
  public class QueryBean implements Serializable {
  
      private String name;
  
      public QueryBean() {
          name = "Maozturk";
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
  }
  </code></pre>
  
  <p>In XHTML file, I'm trying to use this bean like this :</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;h:outputText value="#{queryBean.name}" /&gt;
  </code></pre>
  
  <p>Whatever I tried to access name variable, I couldn't, I tried @PostConstruct to give an initial value also I had the same problem.</p>
  
  <p>Here is error that I got : </p>
  
  <blockquote>
    <p>SEVERE: Servlet.service() for servlet [Faces Servlet] in context with
    path [/RIA]   threw exception [/index2.xhtml @296,48
    value="#{queryBean.name}": Property 'name' not found  on type
    Beans.QueryBean] with root cause javax.el.PropertyNotFoundException:
    Property 'name' not found on type Beans.QueryBean     at
    javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:229)
      at
    javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:206)
      at javax.el.BeanELResolver.property(BeanELResolver.java:317)    at
    javax.el.BeanELResolver.getValue(BeanELResolver.java:85)  at
    com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
      at
    com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
      at org.apache.el.parser.AstValue.getValue(AstValue.java:183)    at
    org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
      at
    com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
      at
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      at
    javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:174)   at
    com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
      at
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
      at
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
      at
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
      at
    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
      at
    com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
      at
    com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
      at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
      at
    org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:70)
      at
    org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:57)
      at
    org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:204)
      at
    org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:121)
      at
    org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:58)
      at
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)    at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:889)
      at
    org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:70)
      at
    org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:57)
      at
    org.primefaces.component.dialog.DialogRenderer.encodeContent(DialogRenderer.java:184)
      at
    org.primefaces.component.dialog.DialogRenderer.encodeMarkup(DialogRenderer.java:113)
      at
    org.primefaces.component.dialog.DialogRenderer.encodeEnd(DialogRenderer.java:47)
      at
    javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
      at
    com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:461)
      at
    com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133)
      at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)    at
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)   at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      at
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)</p>
  </blockquote>
  
  <p>Here is my web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><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"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0"&gt;
  &lt;display-name&gt;RIA&lt;/display-name&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&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;/faces/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;primefaces.THEME&lt;/param-name&gt;
      &lt;param-value&gt;bluesky&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;/web-app&gt;
  </code></pre>