Applets can connect to database same as applications but with a few restrictions: 1. Applet can always connect to database server that is running on the same machine as the web server where applet is located. 2. Applet can connect to any database that is specified in security.policy file. 3. Applet can be signed to allow it access to database. It is not always necessary to spend money to get appropriate drivers. Many are available for free.

hasan wasif2k1
Greenhorn

Joined: Jan 13, 2001
Posts: 26

posted May 15, 2001 23:25:00

0

What is the threat to Java security if permisions are not set and how that threat is avoided using 3rd party software ???

Paul Bailey
Ranch Hand

Joined: Oct 20, 2000
Posts: 91

posted May 16, 2001 09:21:00

0

Hasan, The security hole is that your applet would be trying to access a database on the remote computer. If the remote computer trusts your applet (as in 2, or 3 from Aleksey's email). Then you are okay. Otherwise, the computer owner might not want you reading their databases. Aleksey, how can i conect to databases on my server without buying a driver? (As in, where who has a free driver).

hasan wasif2k1
Greenhorn

Joined: Jan 13, 2001
Posts: 26

posted May 18, 2001 00:20:00

0

Dear Mr Bailey, If applet can make connection from the server it is downloaded then why can't it access database of that server from where it is downloaded ???.

Paul Bailey
Ranch Hand

Joined: Oct 20, 2000
Posts: 91

posted May 18, 2001 13:07:00

0

You will need a database server that the applet can connect to, then the applet _can_ connect to the server from which it was downloaded. Paul

how do i changed the security.policy file? and what do i change in it?

Originally posted by Aleksey Matiychenko:Applets can connect to database same as applications but with a few restrictions: 1. Applet can always connect to database server that is running on the same machine as the web server where applet is located. 2. Applet can connect to any database that is specified in security.policy file. 3. Applet can be signed to allow it access to database. It is not always necessary to spend money to get appropriate drivers. Many are available for free.

Could you please increase the "granularity"? I am new to the issues involved in writing applets and have no idea how to get an applet to access a remote database. I am using MS Access by the way. My applet is running on Tomcat and the DB is just an mdb file. I hate to ask, but I need a step by step explanation on how to resolve this. If there a resource you can point me to, please let me know. Thanks in advance! kh