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

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

https://img2.mukewang.com/5d1e98740001673519201041.jpghttps://img3.mukewang.com/5d1e98c600018c8719201041.jpghttps://img4.mukewang.com/5d1e98de0001fc5619201041.jpghttps://img3.mukewang.com/5d1e98f7000134aa19201041.jpghttps://img2.mukewang.com/5d1e990d00016d0319201041.jpghttps://img1.mukewang.com/5d1e992b00014c4213360924.jpg

05-Jul-2019 08:22:09.195 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [struts2]

 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)

at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)

at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:525)

at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:264)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590)

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

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

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

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

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

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)

at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)


提问者:tongguangyu 2019-07-05 08:28

个回答

  • KeenYeh
    2019-07-06 21:11:29

    <!--  配置Struts 2.3.16的核心Filter的实现类  -->

    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

    <!--  配置Struts 2.5.14的核心Filter的实现类  -->

    <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>