This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Are you using JNDI to acquire the DB connection? That most likely won't work in an applet, since there's no JEE environment that can provide resources. You'll probably need to use the general JDBC way of obtaining connections.
Is this an intranet application? Otherwise I'd be very concerned about security.
Firstly, I think the applet sandbox expressly forbids JDBC connections. So you'd have to create a signed applet.
Secondly, what you're intending is a 2-tier application. The inadvisability of using a 2-tier architecture was rather graphically demonstrated when the SQL Slammer worm was unleashed.
JDBC opens a port directly into your database server, which makes it a higher risk than if you use an intermediary (3-tier) architecture. I only recommend 2-tier for stuff that's operating entirely inside a firewall.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Mar 22, 2005
Like I said, an applet isn't part of the JEE environment, and thus won't be able to get resources (like a DB connection) through JNDI. So you need to open the connection using Class.forName etc., as you would for any old DB connection.