web.xml中的多个resource-ref

时间:2016-03-22 09:09:07

标签: xml web web.xml dtd

我需要将我的应用程序连接到另一个数据源,因此,我在web.xml中添加了另一个resource-ref。它看起来像这样:

<resource-ref>
    <description>A Schema DB Connection</description>
    <res-ref-name>jdbc/AschemaDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
    <description>B Schema DB Connection</description>
    <res-ref-name>jdbc/BschemaDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

现在,在eclipse中,我可以看到有关DTD架构规范(web-app_2_3.dtd)的错误,如下所示:

  

元素类型的内容&#34; web-app&#34;必须匹配&#34;(icon ?, display-name ?, description ?, distributable?,context-param *,filter *,filter-mapping *,listener *,servlet *,servlet-mapping *,session-config?, MIME映射*,欢迎文件列表?,错误页*,标签库*的resource-env-REF *,资源引用*,安全约束*,登录-配置?,安全角色*,ENV进入*,EJB-REF *,EJB本地-REF *)&#34;

我虽然星号(资源参考*)意味着&#34;尽可能多的&#34;

我的配置中是否缺少某些内容?

0 个答案:

没有答案