To connect to derby
database while using Tomcat
, I downloaded the jar of core Apache Derby database engine (version : 10.9.1.0). I kept this jar file under the lib
folder in Tomcat.
Now I was told to add the following in context.xml
of Tomcat
.
<Resource name="jdbc/PollDatasource" auth="Container" type="javax.sql.DataSource"
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby://localhost:1527/polldatabase;create=true"
username="suhail" password="suhail"
maxActive="20" maxIdle="10" maxWait="-1" />
What does this tag do ? I mean what it is meant for ?
Though the Jar file i downloaded contains the pattern
org.apache.derby.jdbc.EmbeddedDriver
where in this tag I mention the jar that I downloaded? Isn't there a need to add the name of archive in the tag ?