Question

i work on ubuntu with java EE-Eclipse ,tomcat and mariadb.i have written a test class and when i run as java application,it can connect to mariadb.but when i test in servlet and run on tomcat server,this line "Class.forName("org.mariadb.jdbc.Driver");"dosen't work...i don't know why and can not solve this problem.help!help!

Was it helpful?

Solution

You need to add the driver jar to WEB-INF/lib in your Tomcat application / war file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top