title: why do i get org.apache.jasper.JasperException: PWC6049: Attempted a bean operation on a null object
body: <p>I get <code>org.apache.jasper.JasperException: PWC6049: Attempted a bean operation on a null object</code> when i click the submit button and the request goes to the following jsp:</p>
  
  <pre><code>&lt;jsp:useBean id="namebean" class="BeanTesters.Bean"&gt;
          &lt;jsp:setProperty name="namebean" property="name" param="Name" /&gt;
      &lt;/jsp:useBean&gt;
  
      &lt;%--Now check if the text-field data has been stored--%&gt;
      &lt;jsp:getProperty name="beanname" property="name" /&gt;
  </code></pre>
  
  <p>HTML code :</p>
  
  <pre><code>&lt;form method="get" action="straighttojsp.jsp"&gt;
          &lt;input type="text" name="Name" /&gt; &lt;br /&gt;
          &lt;input type="submit" value="Submit data"/&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Bean class :</p>
  
  <pre><code>package BeanTesters;
  
  public class Bean {
  
  private String name = null;
  
  public void setName(String n) {
      name = n;
  }
  
  public String getName() {
      return name;        
   }
  }
  </code></pre>
  
  <p>Why do i get this exception ?</p>