关于Eclipse自带tomcat配置连接池问题

Eclipse自带的tomcat如果想在conf/Catanila/localhost/文件夹下配置context文件可能比较麻烦、可以直接将写好的context文件直接放在web项目下、跟web.xml放在一起,如下是2005数据库配置连接池的context文件内容
<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<Context reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<Resource
name="kone"
type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
username="sa"
password="kone"
maxIdle="10"
maxWait="5000"
url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ShopWeb"
maxActive="200"/>
</Context>
具体项目对应内容就不多说了
Tags: 

延伸阅读

最新评论

发表评论