private void ApplySinglePayloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ApplySinglePayloadButtonActionPerformed
    String HTTPRequest = "", output = "";

    Connection conn = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    int VULNERABILITY_INJECTION_RESULTS_ID;

    // Adapted from http://developers.sun.com/docs/javadb/10.2.2/ref/rrefclob.html
    try {
        if ((conn = this.JavaDBAccess.setConn()) != null) {
            System.out.println("Connected to database " + this.JavaDBAccess.getDatabaseName());
        } else {
            throw new Exception("Not connected to database " + this.JavaDBAccess.getDatabaseName());
        }

        conn.setAutoCommit(false);

        // Test to see if the Target PHP file is already in the DB
        ps = conn.prepareStatement("SELECT VULNERABILITY_INJECTION_RESULTS.ID FROM VULNERABILITY_INJECTION_RESULTS,TARGET_PHP_FILES WHERE VULNERABILITY_INJECTION_RESULTS.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND TARGET_PHP_FILES.PATH=? AND VULNERABILITY_INJECTION_RESULTS.DIFF_TEXT=?"); // get the result

        ps.setString(1, TargetPHPFileSelectedComboBox.getSelectedItem().toString());
        ps.setString(2, VulnerabilitySelectedComboBox.getSelectedItem().toString());
        rs = ps.executeQuery(); // get the result

        rs.next();
        // Open matches log file.
        VULNERABILITY_INJECTION_RESULTS_ID = rs.getInt(1);

        // Test to see if the Target PHP file is already in the DB
        ps = conn.prepareStatement("SELECT ATTACK_PAYLOADS.HTTP_REQUEST FROM ATTACK_PAYLOADS,PAYLOADS WHERE ATTACK_PAYLOADS.PAYLOAD=PAYLOADS.ID AND ATTACK_PAYLOADS.ATTACK_RESULT='SUCCESSFUL' AND ATTACK_PAYLOADS.VULNERABILITY_INJECTION_RESULT=?"); // get the result

        ps.setInt(1, VULNERABILITY_INJECTION_RESULTS_ID);
        rs = ps.executeQuery(); // get the result

        rs.next();
        HTTPRequest = rs.getString("HTTP_REQUEST");
        rs.close();
        ps.close();
        conn.commit();
        conn.close();

    } catch (Throwable e) {
        System.out.println("exception thrown:");

        if (e instanceof SQLException) {
            JavaDBAccess.printSQLError((SQLException) e);
        } else {
            e.printStackTrace();
        }
    }
    try {
        //Execute the attack through the HTTP proxy
        output = Attack.issueRequest(HTTPRequest, WebApplicationIPAddress.getText(), Integer.parseInt(WebApplicationPort.getText()));
    } catch (Exception e) {
        output = e.toString();
    }
    VulnerabilityInjectionTextArea.setText("Payload Applyed");
}