stmt2 = conn.prepareStatement("DELETE FROM submissions WHERE id="
stmt = conn.prepareStatement("DELETE FROM submissions WHERE id="
  public void doGet(HttpServletRequest request, HttpServletResponse response)      throws IOException, ServletException  {    ServletPrinter    sp = null;    PreparedStatement stmt = null, stmt2 = null;    Connection        conn = null;    sp = new ServletPrinter(response, "RejectStory");    String storyId;    ResultSet rs = null;    int updateResult;    storyId = request.getParameter("storyId");    if (storyId == null)    {      sp          .printHTML("RejectStory: <h3>You must provide a story identifier !<br></h3>");      return;    }    sp.printHTMLheader("RUBBoS: Story submission result");    sp.printHTML("<center><h2>Story submission result:</h2></center><p>\n");    conn = getConnection();    try    {      stmt = conn.prepareStatement("SELECT id FROM submissions WHERE id="          + storyId);      rs = stmt.executeQuery();    }    catch (Exception e)    {      sp.printHTML("Failed to execute Query for RejectStory: " + e);      closeConnection(stmt, conn);      return;    }    try    {      if (!rs.first())      {        sp            .printHTML("<h3>ERROR: Sorry, but this story does not exist.</h3><br>\n");        closeConnection(stmt, conn);        return;      }      // Delete entry from database      stmt2 = conn.prepareStatement("DELETE FROM submissions WHERE id="          + storyId);      updateResult = stmt2.executeUpdate();    }    catch (Exception e)    {      sp.printHTML("Exception rejecting story: " + e + "<br>");      closeConnection(stmt, conn);      return;    }    closeConnection(stmt, conn);    sp        .printHTML("The story has been successfully removed from the submissions database table<br>\n");    sp.printHTMLfooter();  }