tomcat mysql数据源配置

来源:互联网 发布:淘宝库客运动正品吗 编辑:程序博客网 时间:2024/05/06 23:19

在jsp查询数据库时,没有考虑tomcat配置,总是提醒com.mysql.jdbc.Driver无法加载

 在tomcat的conf下的context.xml加上

<Resource name="jdbc/location" auth="Container" type="javax.sql.DataSource"

             maxActive="100" maxIdle="30" maxWait="10000"
             username="root" password="123456" driverClassName="com.mysql.jdbc.Driver"
             url="jdbc:mysql://localhost:3306/location"/>
0 0
原创粉丝点击