Tomcat启动即报错

来源:3-3 [Struts2] 统计Action调用时间案例实现

亮剑4

2016-11-28 21:39

为什么我在启动Tomcat并且还没开始在浏览器中运行的时候就直接报错了:Exception starting filter struts2,请问是何原因?

写回答 关注

2回答

  • 兮蓅
    2016-12-04 10:58:55

    web.xml文件中的struts配置错误?包文件都导入了吗?能不能把web.xml和struts.xml文件贴出来看看

    兮蓅 回复亮剑4

    哈 我是用的Struts2.5.5的版本,很多都是和老师相同的操作就是没有该有的效果。遇到这个情况也可以试用下Myeclipse,很多东西都帮你弄好了。

    2016-12-04 11:20:03

    共 2 条回复 >

  • 亮剑4
    2016-11-28 21:41:12

    严重: Exception starting filter struts2

    Unable to load configuration. - [unknown location]

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

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

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

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

    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)

    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)

    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. - [unknown location]

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

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

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

    ... 14 more

    Caused by: Parent package is not defined: struts/default - [unknown location]

    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:670)

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

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

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

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

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

    ... 16 more

    这是详细错误信息。

Struts2拦截器浅析

本视频教程将代领大家了解Struts2拦截器的工作原理及配置

37980 学习 · 118 问题

查看课程

相似问题