• <small id='UWsMU'></small><noframes id='UWsMU'>

        <legend id='UWsMU'><style id='UWsMU'><dir id='UWsMU'><q id='UWsMU'></q></dir></style></legend>

        <tfoot id='UWsMU'></tfoot>

        • <bdo id='UWsMU'></bdo><ul id='UWsMU'></ul>
        <i id='UWsMU'><tr id='UWsMU'><dt id='UWsMU'><q id='UWsMU'><span id='UWsMU'><b id='UWsMU'><form id='UWsMU'><ins id='UWsMU'></ins><ul id='UWsMU'></ul><sub id='UWsMU'></sub></form><legend id='UWsMU'></legend><bdo id='UWsMU'><pre id='UWsMU'><center id='UWsMU'></center></pre></bdo></b><th id='UWsMU'></th></span></q></dt></tr></i><div id='UWsMU'><tfoot id='UWsMU'></tfoot><dl id='UWsMU'><fieldset id='UWsMU'></fieldset></dl></div>

        异常启动过滤器 struts2 - 尝试添加 JAR,但结果相同

        Exception starting filter struts2 - tried adding JAR#39;s, but same result(异常启动过滤器 struts2 - 尝试添加 JAR,但结果相同)

            <tfoot id='xbWWp'></tfoot>
            <i id='xbWWp'><tr id='xbWWp'><dt id='xbWWp'><q id='xbWWp'><span id='xbWWp'><b id='xbWWp'><form id='xbWWp'><ins id='xbWWp'></ins><ul id='xbWWp'></ul><sub id='xbWWp'></sub></form><legend id='xbWWp'></legend><bdo id='xbWWp'><pre id='xbWWp'><center id='xbWWp'></center></pre></bdo></b><th id='xbWWp'></th></span></q></dt></tr></i><div id='xbWWp'><tfoot id='xbWWp'></tfoot><dl id='xbWWp'><fieldset id='xbWWp'></fieldset></dl></div>

                <legend id='xbWWp'><style id='xbWWp'><dir id='xbWWp'><q id='xbWWp'></q></dir></style></legend>

                <small id='xbWWp'></small><noframes id='xbWWp'>

                  <tbody id='xbWWp'></tbody>
                • <bdo id='xbWWp'></bdo><ul id='xbWWp'></ul>
                • 本文介绍了异常启动过滤器 struts2 - 尝试添加 JAR,但结果相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这是我得到的错误:

                  SEVERE: Exception starting filter struts2
                  java.lang.NoClassDefFoundError: com/opensymphony/xwork2/config/FileManagerProvider
                      at org.apache.struts2.dispatcher.Dispatcher.init_FileManager(Dispatcher.java:336)
                      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:465)
                      at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
                      at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
                      at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
                      at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
                      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
                      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
                      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
                      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
                      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
                      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
                      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
                      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
                      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
                      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
                      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
                      at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
                      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
                      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
                      at org.apache.catalina.core.StandardService.start(StandardService.java:525)
                      at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
                      at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                      at java.lang.reflect.Method.invoke(Unknown Source)
                      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
                      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
                  Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.config.FileManagerProvider
                      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
                      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
                      ... 30 more
                  

                  JAR 列表:

                  antlr-2.7.6.jar
                  commons-beanutils-1.8.3.jar
                  commons-collections-3.2.1.jar
                  commons-digester-2.1.jar
                  commons-fileupload-1.3.jar
                  commons-logging-1.1.1.jar
                  dom4j-1.6.1.jar
                  ejb3-persistence-1.0.2.GA.jar
                  freemarker-2.3.16.jar
                  hibernate-annotations-3.2.1.ga.jar
                  hibernate-commons-annotations-3.3.0.ga.jar
                  hibernate-core-4.2.1.Final.jar
                  hsqldb-2.0.0.jar
                  javassist-3.12.1.GA.jar
                  jta-1.1.jar
                  log4j-1.2.15.jar
                  mysql-connector-java-5.1.21.jar
                  ognl-2.7.3.jar
                  slf4j-api-1.6.1.jar
                  slf4j-log4j12-1.7.5.jar
                  struts2-core-2.3.14.3.jar
                  xwork-2.1.3.jar
                  

                  而我的 web.xml 是这样的:

                  And my web.xml is like this:

                  <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>
                  

                  在这个论坛上阅读后我尝试了很多东西:

                  I have tried lot of things after reading on this forum:

                  1. 尝试了不同版本的 JAR.
                  2. 手动将 WAR 部署到 Tomcat 中.
                  3. 将 servlet-api JAR 也放入 lib 文件夹中(尽管它存在于服务器 lib 中).
                  4. 阅读 Tomcat 日志,没有发现任何不同.(请告诉我,我也可以粘贴)

                  但他们都没有帮助.所以,万不得已,我把它贴在这里.

                  But none of them have helped. So, last resort, I am posting it here.

                  推荐答案

                  由于您使用的是 Struts 2.3,

                  Since you are using Struts 2.3,

                  FilterDispatcher 已弃用.您必须使用 StrutsPrepareAndExecuteFilter(或其小兄弟).

                  FilterDispatcher is deprecated. You MUST use StrutsPrepareAndExecuteFilter (or its little brothers).

                  来自官方文档

                  已弃用.从 Struts 2.1.3 开始,使用 StrutsPrepareAndExecuteFilterStrutsPrepareFilterStrutsExecuteFilter 如果需要在此之外使用 ActionContextCleanUp 过滤器em>

                  Deprecated. Since Struts 2.1.3, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilter and StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one

                  然后改这个

                  <!-- Struts < 2.1.3 -->
                  <filter-class>
                      org.apache.struts2.dispatcher.FilterDispatcher
                  </filter-class>
                  

                  到这里:

                  <!-- Struts >= 2.1.3 and < 2.5 -->
                  <filter-class>
                       org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
                  </filter-class>
                  

                  请注意,从 2.5 开始,它将改为:

                  Note that, from 2.5, it would be instead:

                  <!-- Struts >= 2.5 -->
                  <filter-class>
                       org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
                  </filter-class>
                  

                  这篇关于异常启动过滤器 struts2 - 尝试添加 JAR,但结果相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  <tfoot id='sTduX'></tfoot>

                  <small id='sTduX'></small><noframes id='sTduX'>

                • <legend id='sTduX'><style id='sTduX'><dir id='sTduX'><q id='sTduX'></q></dir></style></legend>
                    • <bdo id='sTduX'></bdo><ul id='sTduX'></ul>
                    • <i id='sTduX'><tr id='sTduX'><dt id='sTduX'><q id='sTduX'><span id='sTduX'><b id='sTduX'><form id='sTduX'><ins id='sTduX'></ins><ul id='sTduX'></ul><sub id='sTduX'></sub></form><legend id='sTduX'></legend><bdo id='sTduX'><pre id='sTduX'><center id='sTduX'></center></pre></bdo></b><th id='sTduX'></th></span></q></dt></tr></i><div id='sTduX'><tfoot id='sTduX'></tfoot><dl id='sTduX'><fieldset id='sTduX'></fieldset></dl></div>
                          <tbody id='sTduX'></tbody>