严重: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:504) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490) ... 14 more Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 17 more Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119) at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218) ... 20 more
删除导入的所有jar包。只导入struts-2.3.31appsstruts2-blank.war中的jar包。
需要解压缩struts2-blank.war