title: Can I use simple HTML for @ManagedBean?
body: <p>I am studying Managed Beans right now. I need to use html file to get the data and post them on the next page. I need to use ManagedBean. I am required to use .html file. I can't use JSF because we haven't began to study it yet. </p>
  
  <p>Question: How can I set the value first name in the Voter.java class and then post it the new page?</p>
  
  <p>I tried to use:
  <br></p>
  
  <pre><code> First Name:&lt;input action="UserInfo.setFirstName()" type="text" name="fname" maxlength="30"  
         value="" pattern="[a-zA-Z]{1,30}" title="Please enter first name! Min 1 
         letter"required/&gt;&lt;br&gt;
  </code></pre>
  
  <p></p>
  
  <p>but it doesn't work after I deploy the program.</p>
  
  <p>welcome.html <br></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Welcome Form&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div style="text-align:center"&gt;
  &lt;h1&gt;Welcome&lt;/h1&gt;
      &lt;form action="summary.html"&gt;
       &lt;fieldset&gt;
         &lt;legend&gt;Form:&lt;/legend&gt;
         &lt;fieldset&gt;
         &lt;legend&gt;Personal Information:&lt;/legend&gt;
     First Name:&lt;input action="UserInfo.setFirstName()" type="text" name="fname" maxlength="30"  
         value="" pattern="[a-zA-Z]{1,30}" title="Please enter first name! Min 1 
         letter"required/&gt;&lt;br&gt;
         &lt;/fieldset&gt;
         &lt;p&gt;&lt;/p&gt;
         &lt;input type="submit" value="Submit" /&gt;
      &lt;/fieldset&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p></p>
  
  <p>summary.html <br></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;&lt;title&gt;Thank you&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Information Summary&lt;/h1&gt;
          &lt;li action="SubmissionController.getFirstName()"&gt;&lt;b&gt;First Name:&lt;/b&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p></p>
  
  <p><br></p>
  
  <pre><code>import javax.faces.bean.ManagedBean; 
  import javax.faces.bean.SessionScoped;
  
  @ManagedBean(name="userinfo")
  @SessionScoped
  public class UserInfo {
  
     private String fname;
  
     public UserInfo() {}
  
     public String getFirstName() {
       return fname;
     }
  
     public void setFirstName(String fname) {
        this.fname = fname;
     }
  }
  </code></pre>
  
  <p></p>