# SIGNED APPLET

abdallah@lmias6.u-strasbg.fr
Mon, 22 Feb 1999 17:36:01 +0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Joanne Beausoleil: "(no subject)"
- Previous message: Peter Vennel: "signed applet example 1.2"

    From: abdallah@lmias6.u-strasbg.fr

    Date: Mon, 22 Feb 1999 17:36:01 +0100

    To: java-security@java.sun.com

    Subject: SIGNED APPLET

HELLO,

Can you help me please step by step for signed my applet
(JdbcApplet.java) for connection to Serveur Oracle8 on Linux.

This is my JdbcApplet.java

import java.net.URL;
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;

public class JdbcApplet extends java.applet.Applet implements
ActionListener
{
static final String driver_class = "oracle.jdbc.driver.OracleDriver";
String url = "jdbc:oracle:thin:scott/tiger@myhostname:port:sid";
static final String query = "select 'Hello everybady from JDBC: ' ||
sysdate from dual";
Button execute_button;
TextArea output;
Connection conn;

public void init ()
{
this.setLayout (new BorderLayout ());
Panel p = new Panel ();
p.setLayout (new FlowLayout (FlowLayout.LEFT));
execute_button = new Button ("Hello JDBC");
p.add (execute_button);
execute_button.addActionListener(this);
this.add ("North", p);
output = new TextArea (10, 60);
this.add ("Center", output);

}

public void actionPerformed(ActionEvent ev)
{
try
{
if (conn == null)
{
output.append ("Loading JDBC driver " + driver_class + "\n");
// PrivilegeManager.enablePrivilege("UniversalConnect");
DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
output.append ("Connecting to " + url + "\n");
conn = DriverManager.getConnection(url);
output.append ("Connected\n");
}
Statement stmt = conn.createStatement ();
output.append ("Executing query " + query + "\n");
ResultSet rset = stmt.executeQuery (query);
while (rset.next ())
output.append (rset.getString (1) + "\n");
output.append ("done.\n");
}
catch (Exception e)
{
output.append (e.getMessage () + "\n");
}
}
}

- Next message: Joanne Beausoleil: "(no subject)"
- Previous message: Peter Vennel: "signed applet example 1.2"