From: | "Joe Shevland" <jshevland(at)j-elite(dot)com> |
---|---|
To: | <PaulU71555(at)aol(dot)com>, <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Netscape.security.AppletSecurityException on db Connect |
Date: | 2002-05-30 02:17:20 |
Message-ID: | HEECIHEEJDBMCCGMGIOBGEAMCIAA.jshevland@j-elite.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Shevland | 2002-05-30 10:20:17 | Re: Doubt |
Previous Message | Sam Varshavchik | 2002-05-30 02:14:10 | Re: Netscape.security.AppletSecurityException on db Connect |