Reputation: 95
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.
Upvotes: 0
Views: 754
Reputation: 128949
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.
Upvotes: 1