I'm trying to insert a tuple of data into a DB using JDBC through a web page.
I made a ConnectionFactory
class to encapsulate the connection with MariaDB, I imported the driver for the classpath, I tried inserting some data with a Teste
class with a Main
and worked recognized the driver normally. However, when I use it in the servlet it throws the error:
Ihavealreadyputthedriverjarinsidethetomcatlibfolder,IalreadyputitinsidetheWEB-INF/lib
intheprojectdeploybutnothing.I'vealreadyput:
Class.forName("com.mysql.jdbc.Driver");
at the factory but to no avail.