I attempt the following in an applet named PWEntry.class and in an application
named TextInterface.class to connect to a local postgres database named ctfilm
as user Paul with no password:
url = "jdbc:postgresql://127.0.0.1/ctfilm?user=Paul&password=NONE";
You can omit everything starting from '?user...' if you like, as you're passing in the username and password below.
.
.
DriverManager.getConnection(url, "Paul", "");
This works fine from command line application; trying to load the applet into
Netscape produces this error:
netscape.security.AppletSecurityException: security.Couldn't connect to
'127.0.0.1' with origin from 'local-classpath-classes'.
I'm using Apache.
Do you use in the URL for the browser something like 'http://127.0.0.1/...'? Applets are restricted (for security reasons) in that they can only make network connections back to the IP address/host they were served from. If Apache is listening on another interface (192.168.x.x or whatever), you'll need to use a different JDBC URL e.g. jbc:postgresql:192.168.x.x/ctfilm (or alter your browser URL to http://127.0.0.1/...).
Regards,
Joe