当前位置: 代码迷 >> Java Web开发 >> Parse error in application web.xml,该如何解决
  详细解决方案

Parse error in application web.xml,该如何解决

热度:4101   发布时间:2013-02-25 21:10:26.0
Parse error in application web.xml
麻烦大家帮忙看看这是什么问题呀,我原来用的是tomcat5.0 后来改成tomcat5.5。
而且tomcat启动时,没有问题,只是进入项目后,重加载,就出现这个问题了。


严重: Parse error in default web.xml
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
at org.apache.catalina.startup.ContextConfig.processDefaultWebConfig(ContextConfig.java:677)
at org.apache.catalina.startup.ContextConfig.defaultWebConfig(ContextConfig.java:614)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1043)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:595)
2010-8-26 16:01:31 org.apache.catalina.startup.ContextConfig applicationWebConfig
严重: Parse error in application web.xml file at jndi:/localhost/cms/WEB-INF/web.xml
java.lang.NullPointerException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3025)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:432)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1278)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:595)
2010-8-26 16:01:31 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2010-8-26 16:01:31 org.apache.catalina.core.StandardContext start
严重: Error getConfigured
2010-8-26 16:01:31 org.apache.catalina.core.StandardContext start

------解决方案--------------------------------------------------------
用UE或者其他编辑器看是否有特殊字符,比如行末尾的空格

Tomcat新版本对web.xml格式要求比旧版本要严格
  相关解决方案