title: Create login page using Javabeans (properties not being set)
body: <p>Okay, so I am trying to create a login page for a website I am working on. I am using Javabeans in eclipse. I have my bean set up, but the property are not being set.</p>
  
  <p>Here is the code for my login.jsp page:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;%@page import="java.util.*" %&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Log-In&lt;/title&gt;
          &lt;meta http-equiv=Content-Type content="text/html"&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  
      &lt;jsp:useBean id="login" class="edu.iup.COSC473.Beans.LoginBean" scope="session"/&gt;
      &lt;jsp:setProperty name="login" property="*"/&gt;
  
      &lt;form method="post" action="check.jsp"&gt;
  
      &lt;table width="100%"&gt;
          &lt;tr&gt;
              &lt;td&gt;Username:&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" name="username"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Password:&lt;/td&gt;
              &lt;td&gt;&lt;input type="text" name="password"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
          &lt;td&gt;&lt;input type="submit"/&gt;&lt;/td&gt;
      &lt;/table&gt;
      &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is the code for check.jsp (a test page I am using to see is the properties are being set):</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;%@page import="java.util.*" %&gt;
  
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Log-In&lt;/title&gt;
          &lt;meta http-equiv=Content-Type content="text/html"&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
      &lt;jsp:useBean id="login" class="edu.iup.COSC473.Beans.LoginBean" scope="session"/&gt;
          User Name: &lt;jsp:getProperty name="login" property="username" /&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Finally, here is the LoginBean.java class:</p>
  
  <pre><code>public class LoginBean {
      String username;
      String password;
  
      public String getUsername() {
          return username;
      }
      public void setUsername(String username) {
          this.username = username;
      }
      public String getPassword() {
          return password;
      }
      public void setPassword(String password) {
          this.password = password;
      }
  }
  </code></pre>
  
  <p>I was hoping someone could help me figure out why my properties are not being set when I click the submit button on the login page. Thanks in advance for your help!</p>