title: Java Servlet how to get a specific value from a session attribute
body: <p>OK, I'm kind of inept at explaining my problems, but I'll try to be as detailed, yet concise as possible. </p>
  
  <p>I have 2 servlets;
  NewCustomerServlet and 
  LoginServlet</p>
  
  <p>I have 1 Java bean;
  User</p>
  
  <p>The User has a bunch of fields. username, firstName, password, etc...</p>
  
  <p>my index.jsp automatically directs the user to NewCustomerServlet, so the user can create an "account"
  Once they finish filling in the fields the User bean is created and saved in the session. Then, the user is able to "login" </p>
  
  <p>The problem I'm having is validating the username from the "user" session with the login.jsp fields using the session.</p>
  
  <p>How do I access the sessions "username" or "password" field. All I can seem to access is the name of the session, which would be "user"?</p>