As soon as you put the jar in the Tomcat lib folder, Tomcat will automatically download it and place it in the class path so that all applications running on Tomcat know about this jar.
An XML definition simply means that you have defined a data source. The data source is used on application servers to manage database connection pools, so you donβt need to, this is the preferred method instead of plain JDBC.
In the xml that you defined: driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
, and since you put the jar driver that contains this class, in the lib folder it will know where to look for it, without indicating where it is bank.
Please note that placing a flag under Tomcat lib is not always the best solution, because, as I said, all applications under tomcat will know about this bank, and if there is an application that already uses this bank with a different version, it can cause conflicts .
The best solution would be to install jar under WEB-INF / lib, and only this application knows about the bank.
source share