File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Applet-Database Connectivity. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Applet-Database Connectivity." Watch "Applet-Database Connectivity." New topic
Author

Applet-Database Connectivity.

Anunay Ashish
Greenhorn

Joined: Aug 30, 2002
Posts: 7
Hi All,
Is it possible to retrieve and post data directly to a database without any intermediary ASP, JSP or Servlets?
Thanks.
Anunay Ashish


Anunay Ashish<br />Software Engineer<br />India
Stefan Zoerner
Author
Ranch Hand

Joined: Nov 29, 2001
Posts: 121
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


Stefan Zoerner
Author of German LDAP-Book
Committer at Apache Directory Project
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16055
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet-Database Connectivity.