Creating A Trusted Applet To Allow Access To A Database
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ian_Hendry
Posted On:   Thursday, April 18, 2002 09:02 AM

I have written an Applet that accesses information from an Access Database (using the JDBC-ODBC bridge). When I run the applet (in Appletviewer it says that the applet was not initialised) it says in the Dos prompt that a security exception is thrown and access was denied. I am fairly sure this occurs because the applet is an untrusted applet. I have tried editing the classpath in the Microsoft Java Vitual Machine registry file but this did not effect it, I have tried putting:- set classpath c:....... %classpath%; in the autoexec to set the classpath where the applet and class files the applet uses to make it a trusted applet but this doesn't seem to work either. I even put the applet and applet class files in   More>>

I have written an Applet that accesses information from an Access Database (using the JDBC-ODBC bridge). When I run the applet (in Appletviewer it says that the applet was not initialised) it says in the Dos prompt that a security exception is thrown and access was denied.



I am fairly sure this occurs because the applet is an untrusted applet. I have tried editing the classpath in the Microsoft Java Vitual Machine registry file but this did not effect it, I have tried putting:-



set classpath c:....... %classpath%;



in the autoexec to set the classpath where the applet and class files the applet uses to make it a trusted applet but this doesn't seem to work either. I even put the applet and applet class files in the directory that is a trusted directory (according to the registry file) but this didn't work either.



I have also run the applet in the form of an application (I made a few minor changes to the applet code) and it doesn't have a problem accessing the information in the database, it is just when I run it as an of the applet.



Could anybody throw some light on this matter as I am very confused at the moment and I don't know what else to do.



Many Thanks.

   <<Less

Re: Creating A Trusted Applet To Allow Access To A Database

Posted By:   Laxman_Subramanian  
Posted On:   Friday, April 19, 2002 09:30 AM

Applets need to be signed to Read the Database . I would advise having Applet posting to servlet and servlet returning the Data from the database to the applet .By this way you need not Sign the applet .

Regarding the signing of applet .You need to download the Microsoft SDK for java from http://www.microsoft.com/java and follow the documentation it would greatly help .
About | Sitemap | Contact