简体   繁体   English

(xml)cvc-complex-type.2.4.a:发现无效内容,以元素“ init-param”开头

[英](xml) cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'

I do not know what caused this error. 我不知道是什么原因导致此错误。

Please help me fix this error. 请帮助我解决此错误。

在此处输入图片说明

cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. cvc-complex-type.2.4.a:发现无效的内容(从元素“ init-param”开始)。 One of '{" http://java.sun.com/xml/ns/javaee ":module-name, "http:// java.sun.com/xml/ns/javaee":description, " http://java.sun.com/xml/ns/javaee ":display-name, " http://java.sun.com/xml/ns/javaee ":icon, "http:// java.sun.com/xml/ns/javaee":distributable, " http://java.sun.com/xml/ns/javaee ":context-param, " http://java.sun.com/xml/ns/javaee ":filter, "http:// java.sun.com/xml/ns/javaee":filter-mapping, " http://java.sun.com/xml/ns/javaee ":listener, " http://java.sun.com/xml/ns/javaee ":servlet, " http://java.sun.com/ xml/ns/javaee":servlet-mapping, " http://java.sun.com/xml/ns/javaee ":session-config, " http://java.sun.com/xml/ns/javaee ":mime-mapping, "http:// java.sun.com/xml/ns/javaee":welcome-file-list, " http://java.sun.com/xml/ns/javaee ":error-page, " http://java.sun.com/xml/ns/javaee ":jsp-config, "http:// java.sun.com/xml/ns/javaee":security-constraint, " http://java.sun.com/xml/ns/javaee ":login-config, " http://java.sun.com/xml/ns/javaee ":security-role, " http://java.s '{“ http://java.sun.com/xml/ns/javaee ”:模块名称,“ http:// java.sun.com/xml/ns/javaee” :描述 ,“ http:/ /java.sun.com/xml/ns/javaee“:display-name ,” http://java.sun.com/xml/ns/javaee“:icon ,” http:// java.sun.com/xml / ns / javaee“:可分发,” http://java.sun.com/xml/ns/javaee“:context-param ,” http://java.sun.com/xml/ns/javaee“:filter , “ http:// java.sun.com/xml/ns/javaee” :过滤器映射 ,“ http://java.sun.com/xml/ns/javaee”:listener ,“ http://java.sun .com / xml / ns / javaee “:servlet,” http://java.sun.com/ xml / ns / javaee“:servlet-mapping,” http://java.sun.com/xml/ns/javaee “:session-config,” http://java.sun.com/xml/ns/javaee“:mime-mapping ,” http:// java.sun.com/xml/ns/javaee":welcome-file-列表,“ http://java.sun.com/xml/ns/javaee ”:错误页面,“ http://java.sun.com/xml/ns/javaee”:jsp-config,“http:/ / java.sun.com/xml/ns/javaee":security-constraint,“ http://java.sun.com/xml/ns/javaee”:login-config ,“ http://java.sun.com / xml / ns / javaee “:security-role,” http://java.s un.com/xml/ns/javaee ":env-entry, " http://java.sun.com/xml/ns/javaee ":ejb-ref, " http://java.sun.com/xml/ns/javaee ":ejb-local-ref, "http:// java.sun.com/xml/ns/javaee":service-ref, " http://java.sun.com/xml/ns/javaee ":resource-ref, " http://java.sun.com/xml/ns/javaee ":resource-env-ref, "http:// java.sun.com/xml/ns/javaee":message-destination-ref, " http://java.sun.com/xml/ns/javaee ":persistence-context-ref, " http://java.sun.com/xml/ns/ javaee":persistence-unit-ref, " http://java.sun.com/xml/ns/javaee ":post-construct, " http://java.sun.com/xml/ns/javaee ":pre-destroy, " http://java.sun.com/ xml/ns/javaee":data-source, " http://java.sun.com/xml/ns/javaee ":message-destination, " http://java.sun.com/xml/ns/javaee ":locale-encoding-mapping-list, " http://java.sun.com/xml/ns/javaee ":absolute-ordering}' is expected. un.com/xml/ns/javaee“:env-entry ,” http://java.sun.com/xml/ns/javaee“:ejb-ref ,” http://java.sun.com/xml/ ns / javaee “:ejb-local-ref,” http:// java.sun.com/xml/ns/javaee":service-ref,“ http://java.sun.com/xml/ns/javaee ” :resource-ref,“ http://java.sun.com/xml/ns/javaee”:resource-env-ref ,“ http:// java.sun.com/xml/ns/javaee”:消息目标-ref,“ http://java.sun.com/xml/ns/javaee”:persistence-context-ref ,“ http://java.sun.com/xml/ns/ javaee”:persistence-unit-ref ,“ http://java.sun.com/xml/ns/javaee”:post-construct ,“ http://java.sun.com/xml/ns/javaee”:pre-destroy ,“ http:// java.sun.com/ xml / ns / javaee“:数据源,” http://java.sun.com/xml/ns/javaee“:message-destination ,” http://java.sun.com/ xml / ns / javaee “:locale-encoding-mapping-list,” http://java.sun.com/xml/ns/javaee“:absolute-ordering }”。

<init-param> tag should be inside <servlet> tag like this: <init-param>标记应位于<servlet>标记内,如下所示:

<servlet>
  <servlet-name></servlet-name>
  <servlet-class></servlet-class>
  <init-param>
    <param-name></param-name>
    <param-value></param-value>
  </init-param>
</servlet>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在GlassFish 4服务器上部署War文件时出错(cvc-complex-type.2.4.a:发现无效的内容以元素“ init-param”开头) - Error when deploying war file on GlassFish 4 server (cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param') cvc-complex-type.2.4。在faces-config.xml中发现了以元素工厂开头的无效内容 - cvc-complex-type.2.4.a invalid content was found starting with element factory in faces-config.xml weblogic.xml出错:cvc-complex-type.2.4.a:从元素'prefer-application-packages'开始发现无效内容 - Error in weblogic.xml : cvc-complex-type.2.4.a: Invalid content was found starting with element 'prefer-application-packages' web.xml 中的错误:cvc-complex-type.2.4.a:发现以元素“context-root”开头的无效内容 - Error in web.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'context-root' cvc-complex-type.2.4.a:发现无效的内容(从元素“ beans”开始) - cvc-complex-type.2.4.a: Invalid content was found starting with element 'beans' Spring cvc-complex-type.2.4.a:发现无效的内容(从元素“通道”开始) - Spring cvc-complex-type.2.4.a: Invalid content was found starting with element 'channel' cvc-complex-type.2.4.a:发现无效的内容(从元素“ resources”开始) - cvc-complex-type.2.4.a: Invalid content was found starting with element 'resources' Maven:cvc-complex-type.2.4.a:发现以元素“插件”开头的无效内容 - Maven: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plugin' cvc-complex-type.2.4.a:从元素Media开头发现无效的内容 - cvc-complex-type.2.4.a: Invalid content was found starting with element Media cvc-complex-type.2.4.a:发现无效内容,以元素&#39;beans:bean&#39;开头 - cvc-complex-type.2.4.a: Invalid content was found starting with element 'beans:bean'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM