Solved

Database connectivity from Applets

Posted on 2001-06-23
5
204 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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…
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 learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

615 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