closeConnection();
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException  {    String  value = request.getParameter("itemId");    Integer itemId;    String itemName;    ResultSet rs = null;    sp = new ServletPrinter(response, "ViewBidHistory");    if ((value == null) || (value.equals("")))    {      sp.printHTMLheader("RUBiS ERROR: View bids history");      sp.printHTML("<h3>You must provide an item identifier !<br></h3>");      sp.printHTMLfooter();      return ;    }    else      itemId = new Integer(value);    sp.printHTMLheader("RUBiS: Bid history");    // get the item    try    {      conn = getConnection();      stmt = conn.prepareStatement("SELECT name FROM items WHERE id=?");      stmt.setInt(1, itemId.intValue());      rs = stmt.executeQuery();    }    catch (Exception e)    {      sp.printHTML("Failed to execute Query for item in table items: " +e);      closeConnection();      return;    }    try     {      if (!rs.first())      {        stmt = conn.prepareStatement("SELECT name FROM old_items WHERE id=?");        stmt.setInt(1, itemId.intValue());        rs = stmt.executeQuery();      }    }    catch (Exception e)    {      sp.printHTML("Failed to execute Query for item in table old_items: " +e);      closeConnection();      return ;    }    try     {      if (!rs.first())      {        sp.printHTML("<h2>This item does not exist!</h2>");		            closeConnection();        return;      }      itemName = rs.getString("name");      sp.printHTML("<center><h3>Bid History for "+itemName+"<br></h3></center>");    }    catch (Exception e)    {      sp.printHTML("This item does not exist (got exception: " +e+")<br>");      sp.printHTMLfooter();      closeConnection();      return ;    }    listBids(itemId);    sp.printHTMLfooter();  }