q456123 发表于 2017-2-4 10:37:16

JNDI和JDBC在Tomcat下配置?晕了.........

1,WebContent/META-INF/context.xml中的<ResourceLink name="jdbc/WallpaperDB" global="jdbc/WallpaperDB" type="javax.sql.DataSource" />有什么用?

2,与WEB-INF目录下的web.xml文件加入以下内容
<resource-ref>
 <description>connectDB hcibe</description>
 <res-ref-name>jdbc/connectDB</res-ref-name>
 <res-type>javax.sql.DataSource</res-type>
 <res-auth>Container</res-auth>
</resource-ref>
有什么区别?

JNDI和JDBC在Tomcat下配置?晕了.........

web.xml和context.xml,server.xml
页: [1]
查看完整版本: JNDI和JDBC在Tomcat下配置?晕了.........