// ------------------------------------------------------ // delete.jhtml // // This page confirms the deletion of a job. // // Copyright (c) 1998. Stephen M. Bate, // Object Computing, Inc. All rights reserved. // // This software is being provided by the copyright // holder under the following license. By obtaining, using // and/or copying this software, you agree that you have // read, understood, and will comply with the following // terms and conditions: // // Permission to use, copy, modify, and distribute this // software and its documentation for any purpose and // without fee or royalty is hereby granted, provided that // the full text of this NOTICE appears on ALL copies of // the software and documentation or portions thereof, // including modifications, that you make. // // THIS SOFTWARE IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS // MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR // IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, // COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES // OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE // OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT // INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS // OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL BEAR NO // LIABILITY FOR ANY USE OF THIS SOFTWARE OR DOCUMENTATION. // // Title to copyright in this software and any associated // documentation will at all times remain with copyright // holder. Confirm Job Deletion // ------------------------------------------------------ // See index.jhtml for more details about import and extends. java.sql.* org.phxjug.db.DatabaseServlet


[Maintain Jobs] [Job Listings]

// Check for remote user String user = null; if ((user = request.getRemoteUser()) == null) { out.println("No remote user"); // exception } else { String title = null; String id = null; if ((id = request.getParameter("id")) != null) { Connection con = null; PreparedStatement stmt = null; ResultSet result = null; try { // Get the abstract from the database. This could also // be passed via a query parameter. con = getConnection(); stmt = con.prepareStatement("select * from job where id = ?"); stmt.setString(1, id); result = stmt.executeQuery(); result.next(); title = result.getString("abstract"); } // handle exceptions catch (Exception e) { getServletContext().log(e, "query failed"); } finally { try { if (stmt != null) stmt.close(); if (result != null) result.close(); } catch (Exception e) { getServletContext().log(e, "query cleanup failed"); } // release the connection the db connection pool. // (base class operation) freeConnection(con); } }
Really Delete Job? (user: user): "title"

Select the "back" button or a link if you don't really want to delete this job listing.

} // if user != null // ------------------------------------------------------ // Include the common footer. The footer is placed in the // /_private/jws_footer.html file and can be included // from any jhtml pages on the web site.