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

错误: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-app_2_3.dtd规范

解决方案

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

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


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

"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

什么错误“The content of element type "bean" must match

10-10

2008-10-10 11:53:24,703 ERROR (ContextLoader.java:205) - Context initialization failedrnorg.springframework.beans.factory.BeanDefinitionStoreException: Line 462 in XML document from ServletContext resource [/WEB-INF/config/applicationContext-hibernate.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".rnorg.xml.sax.SAXParseException: The content of element type "bean" must match "(description?,(constructor-arg|property|lookup-method|replaced-method)*)".rn at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 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 Source)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)rn at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:222)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)rn at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

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

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