Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connect to MySQL from Applet

 
Smilidon Sapiens
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Smilidon Sapiens
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic