I would like to specify context for db in xml file.
<Context path="/db3" docBase="C:/my/workspace/db3/">
<Resource name="jdbc/ksidb" auth="Container"
type="javax.sql.DataSource"
description="Books"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/ksidb"
username="root"
password="root"
maxActive="20" />
</Context>
I've read that I should copy that file to /webapps tomcat catalogoue. I did this but tomcat7 doesn't read the file. Do you know why? What to do? Thx.
What you read is wrong. I'd question other advice from that source if it told you something so completely false. Per the Tomcat docs , your options for placing the context configuration are as follows:
I highly recommend you visit the linked docs to learn more about the correct way to configure Tomcat.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.