Are you sure that you've added the jdbc driver (mysqlconnector jar) to your libraries that should be compiled with your code?
Because, when you're running locally, the driver that is setup with your IDE will be used, but when you're deploying a .war file on a Tomcat server, this driver is not included by default.
For example, in Netbeans:
(source: evanaert.eu)
I'm suggesting this because locally everything works fine, but the problem occurs when deploying the .war file.