protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    DBConnection db=new DBConnection();
    HttpSession hs = request.getSession();
    String name=request.getParameter("appname");
    List<Details> dbean=db.getAllDetails(name);
    hs.setAttribute("detbean",dbean);
    if(dbean.isEmpty())
    {
        response.setContentType("text/html");  
        PrintWriter out = response.getWriter();
        out.print("<caption>Sorry, No Record Found</caption>");
    }
    else
    response.sendRedirect("Application.jsp");
}
my jsp code 
               <TABLE BORDER="1" >
                <TR>
                    <TH> <h4 >Application Name</h4> </TH>
                     <TH> <h4 >Abbrebation</h4> </TH>
                      <TH> <h4 >Primary Contact Name</h4> </TH>
                      <TH> <h4 >Primary Contact Number</h4> </TH>
                      <TH> <h4 >Seconday Contact Name</h4> </TH>
                      <TH> <h4 >Secondary Contact Number</h4> </TH>
                      </TR>                       
Collection dbean = (ArrayList)request.getSession().getAttribute("detbean");
       Iterator i=dbean.iterator();
        while(i.hasNext())
        {
            beanclasses.Details item= (beanclasses.Details)i.next();
        
             <%=item.getAPPLICATIONNAME()%>
              <%=item.getAPPABBR()%>
              <%=item.getPRIMARYPERSON()%>
              <%=item.getPRICONTACT()%>
              <%=item.getSECONDAEYPERSON() %>
              <%=item.getSECCONTACT() %>