title: JSP displays blank data
body: <p>I going crazy here trying to figure out, why my JSP doesn't display data in the table.Seems like servlet connects to MySQL and populates data, however I can not push that data to JSP.setAttribute() method is working(objects are there). I can't extract specific information and display it formatted form in the browser.If someone can point me out how troubleshoot this issue... Why JSTL expression doesn't load proper info.Eclipse doesn't return any errors and whole application compiles.... It's just displays empty page.Below you can find the code.</p>
  
  <p>HINT: I was testing if LIST can be pushed and objects can be displayed.It worked, so objects are "visible" to JSP.When I try to load specific info (username, password or email) it returns blank. Thanks for any help/hints.</p>
  
  <p>Below you can find the code.</p>
  
  <p>UserBean.java</p>
  
  <pre><code>package com.admin;
  
  public class UserBean {
      private String password;
      private String firstname;
      private String lastname;
      private String email;
      private String usertype;
      private String datecreated;
      private String username;
  
      public UserBean(){};
  
      public UserBean(String username2, String password2, String firstname2, String lastname2, String email2,
              String usertype2, String datecreated2) {
      }
  
      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;
      }
      public String getFirstname() {
          return firstname;
      }
      public void setFirstname(String firstname) {
          this.firstname = firstname;
      }
      public String getLastname() {
          return lastname;
      }
      public void setLastname(String lastname) {
          this.lastname = lastname;
      }
      public String getEmail() {
          return email;
      }
      public void setEmail(String email) {
          this.email = email;
      }
      public String getUsertype() {
          return usertype;
      }
      public void setUsertype(String usertype) {
          this.usertype = usertype;
      }
      public String getDatecreated() {
          return datecreated;
      }
      public void setDatecreated(String datecreated) {
          this.datecreated = datecreated;
      }
  
  }
  </code></pre>
  
  <p>User.DAO.java</p>
  
  <pre><code>package com.admin;
  
  import java.sql.Connection;
  import java.sql.ResultSet;
  import java.sql.Statement;
  import java.util.ArrayList;
  import java.util.List;
  
  import com.clientdb.ConnectionManager;
  
  public class UserDAO {
  
      public static List&lt;UserBean&gt; listOfUsers()
      {
          List&lt;UserBean&gt; userList=new ArrayList&lt;&gt;();
          String query="SELECT * FROM users";
  
          try
          {
              Connection conn = ConnectionManager.getConnection();
              Statement stm = conn.createStatement();
              ResultSet rs = stm.executeQuery(query);
  
              while(rs.next())
              {
                  String username=rs.getString("username");
                  String password=rs.getString("password");
                  String firstname=rs.getString("firstname");
                  String lastname=rs.getString("lastname");
                  String email=rs.getString("email");
                  String usertype=rs.getString("usertype");
                  String datecreated=rs.getString("date_created");
  
                  UserBean user=new UserBean(username,password,firstname,lastname,email,usertype,datecreated);
                  userList.add(user);
              }
              stm.close();
              rs.close();
              conn.close();       
          }
          catch(Exception ex){System.out.println(ex);}
  
          return userList;
  
  }}
  </code></pre>
  
  <p>UserAdmin.java</p>
  
  <pre><code>package com.admin;
  
  import java.io.IOException;
  import java.util.List;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  public class UserAdmin extends HttpServlet {
      private static final long serialVersionUID = 1L;
  
  
      protected void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
          doGet(request, response);
      }
      protected void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
              List&lt;UserBean&gt; userList = UserDAO.listOfUsers();
              request.getSession().setAttribute("userList",userList);
      request.getRequestDispatcher("userlist.jsp").forward(request,response);
          }
  }
  </code></pre>
  
  <p>userlist.jsp</p>
  
  <pre><code>    &lt;table class="table table-hover"  style="margin-top:20px;"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Username&lt;/th&gt;
        &lt;th&gt;Password&lt;/th&gt;
        &lt;th&gt;First Name&lt;/th&gt;
        &lt;th&gt;Last Name&lt;/th&gt;
        &lt;th&gt;Email&lt;/th&gt;
        &lt;th&gt;User Type&lt;/th&gt;
        &lt;th&gt;Date Created&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
    &lt;c:forEach items="${userList}" var="user"&gt;
      &lt;tr&gt; 
        &lt;td&gt;&lt;c:out value="${user.username}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.password}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.firstname}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.lastname}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.email}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.usertype}"/&gt;&lt;/td&gt;
        &lt;td&gt;&lt;c:out value="${user.datecreated}"/&gt;&lt;/td&gt;
        &lt;td&gt;
          &lt;a href="reset.html" role="button" class="btn btn-primary"&gt;RESET&lt;/a&gt;
          &lt;!--  &lt;button type="button" class="btn btn-danger" data-toggle="modal" data-target="#userDeleteModal"&gt;DELETE&lt;/button&gt;--&gt;
          &lt;a href="deleteUser.do?email=${user.email}" role="button" class="btn btn-danger"&gt;DELETE&lt;/a&gt;       
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/c:forEach&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>