Solved

Database connectivity from Applets

Posted on 2001-06-23
5
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

729 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