Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet-Database Connectivity.

 
Anunay Ashish
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Is it possible to retrieve and post data directly to a database without any intermediary ASP, JSP or Servlets?
Thanks.
Anunay Ashish
 
Stefan Zoerner
Author
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
It is possible to connect from an applet to a JDBC-aware DB (with a type-4 JDBC-Driver deployed with the applet for example), but I would not recommend that in an production/internet scenario.
Greetings from Hamburg,
Stefan
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18154
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use JDBC to do generic database I/O or JNI for more server-specific cases.
However, applets are forbidden by the sandbox - and more importantly by most firewalls - from using either technique. You can get around the sandbox by applet signing, but not every firewall in the world is under your control.
Java applications do not have the sandbox limit - though they still may have to deal with firewalls. In certain cases, such as producing offline reports, a Java application using JDBC is appropriate.
However if you're operating in an Internet-style environment, it's strongly recommended you use 3-tier programming techniques. While the amount of code required is greater, the architecture works more effectively.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic