解决 web.xml 报错The content of element type "web-app" must match

解决web.xml 报错The content of element type “web-app” must match





解决:The content of element type “web-app” must match “(icon ,display-

  错误:The content of element type “web-app” must match “(icon ,display-

name ,description ,distributable ,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-

mapping*,session-config ,mime-mapping*,welcome-file-list ,error-page*,taglib*,resource-env-

ref*,resource-ref*,security-constraint*,login-config ,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)”.

- No grammar constraints (DTD or XML schema) detected for the document.

  web.xml头部配置:

  < xml version=”1.0” encoding=”UTF-8” >
<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “”>
<web-app>

  原因:文档内容标签顺序不符合web-app_2_3.dtd规范

  解决方案

  1:严格按照提示上的顺序排列

  2:删除<!DOCTYPE 。。。。这段内容

 

ps:最好按照标准顺序排列,删除不是常规方法(适合强迫症看到红叉受不了的银)

 

 

 

 

 

以上内容转自:http://jyao.iteye.com/blog/1263650

        </div>
            </div>
        </article>

"web-app" must match

10-20

环境为winxp+tomcat4.1.29rnrn2004-10-19 20:46:26 org.apache.commons.digester.Digester errorrn严重: Parse Error at line 154 column 12: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filternr*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapprning*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,securnrity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*rn)".rnorg.xml.sax.SAXParseException: The content of element type "web-app" must matchrn"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-rnmapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcornme-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constrnraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".rn at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unrnknown Source)rn at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Srnource)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)rnrn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(rnUnknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentrnDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unrnknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at org.apache.commons.digester.Digester.parse(Digester.java:1548)rn at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCornnfig.java:282)rn at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63rn9)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfirng.java:243)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecyclrneSupport.java:166)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:3rn582)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBasern.java:821)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80rn7)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)rnrn at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeprnloyer.java:307)rn at org.apache.catalina.core.StandardHost.install(StandardHost.java:788)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.jrnava:559)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401rn)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.javarn:358)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecyclrneSupport.java:166)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)rnrn at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)rnrn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363rn)rn at org.apache.catalina.core.StandardService.start(StandardService.java:4rn97)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:219rn0)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:512)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:180)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.rnjava:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesrnsorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)rn2004-10-19 20:46:27 org.apache.coyote.http11.Http11Protocol startrnrnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭