hi,
if the e.getMessage() does not give enough information, add the class of the exception
It will probably give you a ClassNotFoundException, here's how to solve it:
If you have a connection from Netbeans to your MySQL database, that does not mean that your application can connect to the MySQL database.
You will have to add the mysql driver (the .jar file that it's in) to your webapplication (just put the jar file the lib folder of your webapplication), or add that .jar file to the classpath of your server.
Herman