tomcat data source configuration method one

Before contacting tomcat, I have always published my web project to the webapp directory of tomcat (which can be published by means of an integrated development environment such as eclipse), and the configuration of the data source is also configured in my own project.

Now the project I use is configured in tomcat's server.xml (the information on the Internet is configured in context.xml), which can be used as a reference:

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      <Context crossContext="true" debug="0" docBase="E:/xxx/xxx/webroot directory of the project" path="/project name" reloadable="false">
<Resource name="jdbc/E5NEW" type="javax.sql.DataSource"
                  driverClassName="oracle.jdbc.driver.OracleDriver"
                  url="jdbc:oracle:thin:service ip:1521:database name"
                  username="username"
	          password="password"

                  maxIdle="5"
                  maxActive="10"
                  maxWait="10000"/>
       </Context>
</Host>

 The database I use here is oracle, and the class files are packaged by ant and placed in the WEB-INF directory, depending on the specific project. .

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326361212&siteId=291194637