问答详情
源自:2-2 Struts2 案例代码实现

control点击org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

无法调到视频中的界面。前面导入包都是按照视频做的,好奇怪

提问者:不偏不易 2016-04-26 09:27

个回答

  • 不偏不易
    2016-04-26 11:04:35

    但是

    control点击org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

    仍然无法获得视频中的页面

  • 不偏不易
    2016-04-26 11:03:30

    已经解决,struts.xml中第七行打错单词了。打错单词造成BUG的事情发生了很多次,以后一定要注意了。

  • 不偏不易
    2016-04-26 10:50:02

    严重: Dispatcher initialization failed

    Unable to load configuration. - action - file:/D:/ComputerScience/Work/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/struts.xml:9:69

    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)

    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)

    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)

    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)

    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:4908)

    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)

    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)

    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)

    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:745)

    Caused by: Action class [com.imooc.action.HelloWroldAction] not found - action - file:/D:/ComputerScience/Work/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/struts.xml:9:69

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:486)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:429)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:556)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295)

    at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)

    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264)

    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)

    ... 21 more


    四月 26, 2016 10:47:46 上午 org.apache.catalina.core.StandardContext filterStart

    严重: Exception starting filter struts2

    Unable to load configuration. - action - file:/D:/ComputerScience/Work/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/struts.xml:9:69

    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)

    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:4908)

    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)

    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)

    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)

    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)

    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)

    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

    at java.util.concurrent.FutureTask.run(FutureTask.java:266)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:745)

    Caused by: Unable to load configuration. - action - file:/D:/ComputerScience/Work/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/struts.xml:9:69

    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)

    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)

    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)

    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)

    ... 18 more

    Caused by: Action class [com.imooc.action.HelloWroldAction] not found - action - file:/D:/ComputerScience/Work/Struts2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloWorld/WEB-INF/classes/struts.xml:9:69

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:486)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:429)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:556)

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295)

    at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)

    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264)

    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)

    ... 21 more


    四月 26, 2016 10:47:46 上午 org.apache.catalina.core.StandardContext startInternal

    严重: One or more Filters failed to start. Full details will be found in the appropriate container log file

    四月 26, 2016 10:47:46 上午 org.apache.catalina.core.StandardContext startInternal

    严重: Context [/HelloWorld] startup failed due to previous errors

    然后变成了这样的问题