title: get complete rows from database in servlet and pass them to jsp using bean class
body: <p>I have one table in database in which some fields are there and having one bean class with some private fields , setter and getter method i am trying to retrieve the using jdbc concept and setting the string value on those method and after creating instance i am calling them in jsp page it is printing some address like this only in first column and remaining are empty com.emp.TimeDetailBean@19bd846 please anyone help me out here 
   here is my bean class...</p>
  
  <pre><code>private String intime;
  private String outtime;
  private String date;
  private String eid;
  
  public String getInTime() {
      return intime;
  }
  
  public void setInTime(String intime) {
      this.intime = intime;
  }
  
  public String getOutTime() {
      return outtime;
  }
  
  public void setOutTime(String outtime) {
      this.outtime = outtime;
  }
  
  public String getEid() {
      return eid;
  }
  
  public void setEid(String eid) {
      this.eid = eid;
  }
  
  public String getDate() {
      return date;
  }
  
  public void setDate(String date) {
      this.date = date;
  }
  </code></pre>
  
  <p>and here is my sevlet code </p>
  
  <pre><code>public class TimeDetail1 extends HttpServlet {
  
      @SuppressWarnings("unchecked")
      public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, java.io.IOException {
  
          HttpSession session = request.getSession(true);
          String eid = (String) session.getAttribute("eid");
          int count = 0;
          Connection con = ConnectionManager.getConnection();
          try {
              Statement st = con.createStatement();
  
              String Query = "select date, intime, outtime, eid  from fulltime where eid='"
                      + eid + "'";
  
              List&lt;TimeDetailBean&gt; ee = new ArrayList&lt;TimeDetailBean&gt;();
              ResultSet rs = st.executeQuery(Query);
  
              while (rs.next()) {
                  TimeDetailBean e = new TimeDetailBean();
                  e.setDate(rs.getString(1));
                  e.setInTime(rs.getString(2));
                  e.setOutTime(rs.getString(3));
                  e.setEid(rs.getString(4));
                  ee.add(e);
              }
  
              request.getSession().setAttribute("ee", ee);
              RequestDispatcher rd = getServletContext().getRequestDispatcher(
                      "/TimeDetail.jsp");
              rd.forward(request, response);
  
          } catch (Throwable theException) {
              System.out.println(theException);
          }
      }
  }
  </code></pre>
  
  <p>and now jsp code is</p>
  
  <pre><code>&lt;%if(session.getAttribute("eid")==null)
  {
      String message ="please login first";
      request.setAttribute("message", message);
      request.getRequestDispatcher("index.jsp").forward(request, response);
  }
  %&gt;
  
  &lt;caption&gt;&lt;h2&gt;List of user timing&lt;/h2&gt;&lt;/caption&gt;
  &lt;tr&gt;
      &lt;th&gt;date&lt;/th&gt;
      &lt;th&gt;intime&lt;/th&gt;
      &lt;th&gt;outtime&lt;/th&gt;
      &lt;th&gt;eid&lt;/th&gt;
  &lt;/tr&gt;
  
  &lt;c:forEach items="${ee}" var="item"&gt;
      &lt;tr&gt;
          &lt;td&gt;${item}&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/c:forEach&gt;  
  </code></pre>