This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connect to MySQL from Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connect to MySQL from Applet" Watch "Connect to MySQL from Applet" New topic
Author

Connect to MySQL from Applet

Smilidon Sapiens
Ranch Hand

Joined: Nov 02, 2000
Posts: 66
Hi,
I try to connect to a mySql database, but I always get this message: Cannot connect to MySql server...(com.ms.SecurityExceptionEx)
I don't want to make a certification, the applet is for an intranet. Is there any other way?
If not, how can I certificat my applet?
Thanks.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
If you don't want to bother with certification, your applet is only allowed to communicate back with the host it was loaded from. So you have two choices:
1. put the database on the same machine as the web server
2. run a "port redirector" on the web server machine which redirects traffic on a specified port to a different port on another machine. This way your applet thinks the database is on the web server machine, but it's actually somewhere else.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Smilidon Sapiens
Ranch Hand

Joined: Nov 02, 2000
Posts: 66
Thanks!
Ok, MySQL is on the webserver. Now, I have to load an image from an other server. This is the same problem right? Where can I get a "port redirector"?
Please help...
 
wood burning stoves
 
subject: Connect to MySQL from Applet
 
Similar Threads
applet db access mediated by jsp db access
applets with jdbc
MYSQL in applet?
Applets with jdbc
Database connection