在ibm-web-bnd.xml中找不到名为"jdbc/devl"的资源引用

Ent*_*opy 6 java websphere web.xml jdbc ibm-rad

RAD 7,WebSphere 7.

IBM的web-bnd.xml:

<resource-ref name="jdbc/devl" binding-name="jdbc/devl" />
Run Code Online (Sandbox Code Playgroud)

web.xml中:

<resource-ref>
  <res-ref-name>jdbc/devl</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <res-auth>Application</res-auth>
  <res-sharing-scope>Unshareable</res-sharing-scope>
  <mapped-name>jdbc/devl</mapped-name>
</resource-ref>
Run Code Online (Sandbox Code Playgroud)

这符合我在互联网上看到的例子.这是因为我正在将此应用程序转换为servlet 2.5.据我了解,web.xml中的res-ref-name应该与resource-ref中的name属性匹配.然后,绑定名称与管理控制台中定义的数据源匹配.为了简单起见,我让它们都匹配.

某个地方还有其他设置吗?因为这会产生问题标题中描述的错误.

小智 1

如果您使用的是 Eclipse,请尝试更新 project.facet.core.xml 中的 Web 模块版本。它应该与 web.xml Web 应用程序版本同步。