title: how to display data obtained from dao in jsp
body: <p>in jsp  </p>
  
  <pre><code>&lt;table width="100%" id='table1'  border="0" cellspacing="2" cellpadding="2"&gt;
      &lt;tr class="tab-highlighted-2"&gt;
          &lt;td class="tab-highlighted-2" width="10%"&gt;
            &lt;div align="left"&gt;Project ID&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="tab-highlighted-2" width="10%"&gt;
            &lt;div align="left"&gt;Project Name&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="tab-highlighted-2" width="20%"&gt;
            &lt;div align="left"&gt;Cost Center&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="tab-highlighted-2" width="20%"&gt;
            &lt;div align="left"&gt;Manager&lt;/div&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
    &lt;tr class="bg-row1"&gt;
    &lt;c:forEach items="${resultList}" var="resultList"&gt; 
          &lt;td class="td-highlighted-2"&gt;
           &lt;div align="left"&gt;&lt;a href="UpdateProject.html"&gt;${resultList.Projid}&lt;/a&gt;&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="td-highlighted-2"&gt;
            &lt;div align="left"&gt;${resultList.Projname}&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="td-highlighted-2"&gt;
            &lt;div align="left"&gt;${resultList.Cost}&lt;/div&gt;
          &lt;/td&gt;
          &lt;td class="td-highlighted-2"&gt;
            &lt;div align="left"&gt;${resultList.Manager}&lt;/div&gt;
          &lt;/td&gt;  
      &lt;/tr&gt;  
      &lt;/table&gt; 
  </code></pre>
  
  <p>in dao    </p>
  
  <pre><code>public final class SearchProjDAO   
  { 
      private static InitialContext context;  
      String CLASS_NAME="DBConnectionFactory";  
  
      public ArrayList  submitProjectDetails(SearchProjVO searchprojVO)   
      {  
          ArrayList ar = new ArrayList();
          String methodname="createConnection";
          Connection conn  = null;
          PreparedStatement psmt;
          try {
              System.out.println("in DAO");
              System.out.println("searchprojVO id=="+searchprojVO.getProjid());
  
              conn = DBConnection.getJNDIConnection();
              ResultSet rs = null;
              String query="select * from CR_EMPLOYEE_DETAILS";if(searchprojVO.getProjid()!=null || searchprojVO.getProjname()!=null || searchprojVO.getManager()!=null)
              query=query+" where ";
          if(searchprojVO.getProjid()!=null)
              query=query+" PROJ_ID="+searchprojVO.getProjid();
          if(searchprojVO.getProjname()!=null)
              query=query+"PROJ_NAME="+searchprojVO.getProjname();
          if(searchprojVO.getCost()!=null);
              query=query+"PROJ_COST="+searchprojVO.getCost();
          if(searchprojVO.getManager()!=null)
              query=query+"PROJ_MANAGER="+searchprojVO.getManager();
  
              psmt= conn.prepareStatement(query);
              rs=psmt.executeQuery();
  
              while(rs.next())
              {
                  SearchProjVO projVO = new SearchProjVO();
                  projVO.setProjid(rs.getString("PROJ_ID"));
                  projVO.setManager(rs.getString("PROJ_NAME"));
                  projVO.setProjname(rs.getString("PROJ_COST"));
                  projVO.setManager(rs.getString("PROJ_MANAGER"));
               ar.add(projVO);
                                  }
  
              System.out.println("conn==="+conn); 
          } catch (Exception e) {
              e.printStackTrace(System.err);
          } 
  
          return ar;
      }
  
  }
  </code></pre>