且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何防止Tomcat6在WEB-INF/lib中预加载JDBC驱动程序?

更新时间:2023-12-02 09:33:34

永远不要将驱动程序放在webapp类路径中.始终将其放入服务器的类路径中.

Never ever put drivers in the webapp class path. Put it always into the server's classpath.

context.xml中声明一个DataSource,然后使用.

Declare a DataSource then in your context.xml and then free the resources with this.