Solved

Database connectivity from Applets

Posted on 2001-06-23
5
194 Views
Last Modified: 2010-03-31
HI..

Can u help me for connecting to vaious DB's from my applet. Also please provide me a detailed info on signed applets.

thanx..

Jim
0
Comment
Question by:jimaricat072100
5 Comments
 
LVL 3

Expert Comment

by:rjackman
ID: 6222573
hi
as far as the applet goes it can only connecdt to the server from which it is downloaded
o if u want to connect to some other server then u have to sign the applet
applet signing pls refer following
http://www.ryerson.ca/~dgrimsha/courses/cps530/SigningScript.html

http://www.object-arts.com/Lib/EducationCentre4/htm/appletcodesigning.htm
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 6223027
As rjackman states, applets are restricted by the browswers security sandbox to only allow HTTP access from the server they were downloaded. The port JDBC uses is also blocked.

This leaves you with a few alternatives:

1.- Create a signed applet, again as rjackman suggests, and request the user for authorization to access th DB.

2.- Encapsulate your JDBC calls inside an HTTP packet (HTTP Tunneling).

3.- Use RMI (which is not blocked by the browser) to write a wrapper over JDBC that will allow you to make calls to a remote RMI server. This server will then act as a Proxy between the applet and the DB.


Option 1 is perhaps the simplest, but you are forced to create two versions: one for Netscape and one for IE. Additionaly, you will have to purchase Level 2 digital signatures.

Option 2 is the most complex option, it implies writting proxies on both the client and server ends. On the plus side, its the most flexible option.

Option 3 is perhaps your best bet. Its quite simple to define and implement an interface that forwards your client side JDBC calls to an RMI server. RMI even has support for HTTP tunneling in case you have to go through firewalls.

If you don't mind using ODBC, you can download a free JDBC-ODBC driver that runs over RMI called RMI-JDBC from:

http://www.objectweb.org/RmiJdbc/

hope this helps.
0
 
LVL 92

Expert Comment

by:objects
ID: 6223038
Here'a PAQ discussing JDBC communication from an applet that you may find helpful:

http://experts-exchange.com/jsp/qManageQuestion.jsp?ta=java&qid=20134997
0
 
LVL 5

Expert Comment

by:vemul
ID: 7616636
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points refunded
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7639918
PAQ'd and points removed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now