How to configure a global JNDI datasource in Tomcat 6?

白昼怎懂夜的黑 提交于 2019-12-03 16:17:28

Move your data source configuration to server.xml <GlobalNamingResources>. (And don't forget to add the driver jar file to tomcat lib). Configure your context.xml so that all Application are aware of the global resource.

<Context>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <ResourceLink global="jdbc/mydb" name="jdbc/mydb" type="javax.sql.DataSource"/>
</Context>

Your mistake: user="xxxx", you need to write username="xxxx" instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!