File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting between Applet and database

 
hasan wasif2k1
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we connect applet to database ?. If not kindly also mention the reason.
 
Paul Bailey
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by hasan wasif2k1:
Can we connect applet to database ?. If not kindly also mention the reason.

Applets can be connected to local databases with permisions set properly and remotely with 3rd party software ($).
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mostafa Al-Mallawani
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Ken Hutchinson
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic