问题描述
org.apache.catalina.core.StandardContextfilterStart严重:Exceptionstartingfilterstruts2[unknownlocation]atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835)atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)atcom.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)atcom.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)atorg.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)atorg.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)atorg.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)atorg.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)atorg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4450)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:722)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:516)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:583)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Causedby:Prematureendoffile.-[unknownlocation]atcom.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)...34moreCausedby:org.xml.sax.SAXParseException:Prematureendoffile.atorg.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(UnknownSource)atorg.apache.xerces.util.ErrorHandlerWrapper.fatalError(UnknownSource)atorg.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)atorg.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)atorg.apache.xerces.impl.XMLScanner.reportFatalError(UnknownSource)atorg.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(UnknownSource)atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnknownSource)atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)atorg.apache.xerces.parsers.XMLParser.parse(UnknownSource)atorg.apache.xerces.parsers.AbstractSAXParser.parse(UnknownSource)atjavax.xml.parsers.SAXParser.parse(SAXParser.java:375)atcom.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:121)...35more2009-7-2412:46:16org.apache.catalina.core.StandardContextstart严重:ErrorfilterStart
解决方案
解决方案二:
你用的是struts2框架吗?把web.xml文件代码贴出来.
解决方案三:
应该是web.xml中的filter配置不正确把web.xml代码贴出来
解决方案四:
<?xmlversion="1.0"encoding="UTF-8"?><web-appversion="2.5"xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener></web-app>
解决方案五:
STRUTS2里面哪个配置的用了非法的结束符,把一块一块剪切掉再部署,不就查出问题来了!
解决方案六:
好像不是web.xml的错误而是资源包有问题.
解决方案七:
谢谢各位,找出问题了,struts配置出了问题。
解决方案八:
我也遇到这样的问题了,但是我的struts.xml中什么东西都还没写呢。。。不知道是哪里的问题,拜托各位了