My applet queries a mysql database, so I included the connector J jar in the eclipse project libraries and my applet runs fine in eclipse, but when i put it on the website, I get an error about that jdbc driver. When I made the jar of my project from eclipse, I don’t think that the jdbc driver was included in the jar, so how would I access the jar? Should I put the jdbc jar inside my project jar, or have my project jar access the driver stored in its own jar.
Right now, I am using
<applet code="test.class" archive="math.jar" width=830 height=600 ></applet>
This isn’t a good idea. You don’t want an applet to access a database directly. You’ll have to expose that port on the public Internet – not a good idea.
A better thought would be to put a servlet in between the applet and the database. Let the applet make the request to the servlet. It can deal with security, validation, binding, accessing the database, and marshalling the response.