I am using Tomcat 10.0.27 and i cant connect my database clear JDBC to Tomcat. I'm faced with the problem: my Tomcat local server didn't see my MySQL database with problem (see below in screenshot) and my META-INF context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource
name="jdbc/MySQLDataBase" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
url="jdbc:mysql://localhost:3306/MySQLDataBase"
driverClassName="com.mysql.jdbc.Driver"
username="***" password="***"
/>
</Context>
and WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
<resource-env-ref>
<resource-env-ref-name>jdbc/MySQLDataBase</resource-env-ref-name>
<resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
</resource-env-ref>
</web-app>
I connect to lib MySQL connector version 8.0.28.jar and tomcat-dbcp-java-9.0.58.jar+tomcat-juil-9.0.58.jar and faced with problem tray (already attached).