You have been very helpful in past and hope you will help me this time too.
I have a applet which draws some diagrams after receiving some data from a MySQL database. This applet works just fine when run as an applet on eclipse. But when I try to embedd it on a web page, the applet is loaded but nothing is displayed. I receive the following message in java console:
I am using jboss 4.2 as web server. I tried moving the "mysql-connector-java-5.1.5-bin.jar" to the required lib folder in jboss directory, but it doesn't help.
What could be the problem??
Problem is that applet runs at client side, in browser. You must write in HTML (or JSP) page <applet code=".." archive="mysql-*.jar">. Jar not must be located in server's lib directory.
And you must write params for database connect in applet! Do you really want to have access to the database in applet?
Joined: Jun 02, 2009
Thanks Vladimir for your time, but I had coded the applet tag as you have mentioned. The problem was that the browser was unable to locate the MySql connector jar while loading the applet. I moved the connector jar into the jdk/jre/lib/ext directory and the problem was solved.
Just out of curiosity: If you have complete control over the client machine (which you need to have in order to put files into the jre/lib/ext directory), why not make this a standalone desktop application (or WebStart application) instead of an applet?
Actually the application we built, is supposed to be accessesd by a designated group of users over a VPN. Their client system configuration is fully controlled by us, so moving the connector jar to the specified directory was not an issue. Furthermore, the applet display is just a part of the bigger application, which was supposed to be accessible through the network.