Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Connection problem from applet to a oracle 8i server in shared mode
Arijit Mukherjee <arijit_at_lucent.com> writes:
> All,
> I have a java applet from which I am trying to access an Oracle 8i
> server running on a different machine in shared mode. I am using a thin
> client to access the server. However, the server spits back to me the
> following exception:
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission <servername> resolve.
>
> However, I do not have any problem and can use the same jdbc
> connection if I use the server in dedicated mode.
>
I preface my comments with the warning it has been 3-4 years since I
have done any java, but ....
From memory, part of the security model for applets restricts network connections so that you are only allowed to connect to the server which served the applet. If your database is not on the same server as your web server, then you will not be able to make any network connections to the database (or anything else not on the same server as your web server).
The way to get around this in the past has been to have your applet either connect to a java servlet on the web server which in turn connects to the database on the other server or have some sort of proxy program running on the web server which your applet connects to and which in turn passes DML to the database server and returns the results to your applet.
As far as I know, there is no way of modifying the applet security model to allow it to connect to another server other than the web server it was served from - which sort of makes sense. I don't think many users would be happy to load applets which might be connecting to any server anywhere on the net.
Tim Received on Tue Oct 08 2002 - 17:55:59 CDT
![]() |
![]() |