title: How can I delete database records from a jsp page?
body: <p>The following code is a part of my project and the output of this code is that I get all the title of the posts in the database and a delete hyperlink in front of all enteries. When I click delete for a respective title it should be deleted from jsp page. How to write code for this?</p>
  
  <pre><code>&lt;label&gt;&lt;h3&gt;Post published:&lt;/h3&gt;&lt;/label&gt;
        &lt;%
                 rs = stmt.executeQuery("select title from Postdata");
         %&gt;
  
                  &lt;table id="rounded-corner" summary="all posts"&gt;
  
                      &lt;tbody&gt;
                          &lt;% while (rs.next()) {%&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;%=rs.getString(1)%&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
  
                                  &lt;a href&gt;&lt;%=""%&gt;Delete&lt;/a&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;%}%&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/y9c6j.png" alt="Screen shot of this code"></p>