When is the tag I added in context.xml gets read?

2019-06-11 08:54发布

问题:

In the context.xml of Tomcat I added the following tag :

    <Resource name="jdbc/MyDatasource" auth="Container" type="javax.sql.DataSource"
       driverClassName="org.apache.derby.jdbc.ClientDriver"
       url="jdbc:derby://localhost:1527/my_database;create=true"
       username="me" password="me"
       maxActive="20" maxIdle="10" maxWait="-1" />

When does the following tag gets read ? Is it read when i start the server ?

回答1:

This configuration is read when the application is deployed. If you have auto-deploy enabled, Tomcat will deploy your webapp during startup.



标签: java tomcat jdbc