• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet-Database Connectivity.

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27891
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic