<%@ page import="java.sql.*" %> <% int f1 = Integer.parseInt(request.getParameter("f1")); Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", ""); PreparedStatement pstmt = con.prepareStatement("DELETE FROM t1 WHERE f1 = ?"); pstmt.setInt(1, f1); pstmt.executeUpdate(); pstmt.close(); con.close(); response.sendRedirect("show.jsp"); %>