closeConnection();
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException  {    String  password=null, username=null;     Integer userId=null;    ResultSet rs = null;    sp = new ServletPrinter(response, "About me");    username = request.getParameter("nickname");    password = request.getParameter("password");        conn = getConnection();    // Authenticate the user    if ((username != null && username !="") || (password != null && password !=""))    {      Auth auth = new Auth(conn, sp);      int id = auth.authenticate(username, password);      if (id == -1)      {        printError("You don't have an account on RUBiS!<br>You have to register first.<br>");        return ;	      }      userId = new Integer(id);    }    else    {      printError(" You must provide valid username and password.");      return ;    }    // Try to find the user corresponding to the userId    try    {      stmt = conn.prepareStatement("SELECT * FROM users WHERE id=?");      stmt.setInt(1, userId.intValue());      rs = stmt.executeQuery();    }    catch (Exception e)    {      sp.printHTML("Failed to execute Query for user: " +e);      closeConnection();      sp.printHTMLfooter();      return;    }    try     {      if (!rs.first())      {        sp.printHTML("<h2>This user does not exist!</h2>");		            closeConnection();        sp.printHTMLfooter();        return;      }      String firstname = rs.getString("firstname");      String lastname = rs.getString("lastname");      String nickname = rs.getString("nickname");      String email = rs.getString("email");      String date = rs.getString("creation_date");      int rating = rs.getInt("rating");      String result = new String();      result = result+"<h2>Information about "+nickname+"<br></h2>";      result = result+"Real life name : "+firstname+" "+lastname+"<br>";      result = result+"Email address  : "+email+"<br>";      result = result+"User since     : "+date+"<br>";      result = result+"Current rating : <b>"+rating+"</b><br>";      sp.printHTMLheader("RUBiS: About "+nickname);      sp.printHTML(result);    }    catch (SQLException s)    {      sp.printHTML("Failed to get general information about the user: " +s);      closeConnection();      sp.printHTMLfooter();      return;    }    listBids(userId, username, password);    listItem(userId);    listWonItems(userId);    listBoughtItems(userId);    listComment(userId);    sp.printHTMLfooter();  }