'Why can't I use external JDBC Maven project in servlet web app as dependency? [duplicate]

I use an external JDBC Maven project in servlet web app as dependency. It works independently, but when I use service classes in servlet class, I get a notification like this:

No suitable driver found for jdbc:mysql://localhost:3306/dbname

enter image description here

How can I solve it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source