ALT加右键能找到包,在TOMCAT上就找不到,有人知道为什么吗

来源:2-2 Struts2 案例代码实现

向向向先生

2018-11-16 17:25

https://img3.mukewang.com/5bee8cc10001386a13660768.jpg

https://img4.mukewang.com/5bee8cd50001351613660768.jpg

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

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

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

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

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

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

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

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

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

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

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

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

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

at java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

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

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

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

at java.util.concurrent.FutureTask.run(Unknown Source)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)

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

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

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

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

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

at org.apache.catalina.startup.Catalina.start(Catalina.java:682)

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

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)


十一月 16, 2018 5:20:49 下午 org.apache.catalina.core.StandardContext startInternal

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

十一月 16, 2018 5:20:49 下午 org.apache.catalina.core.StandardContext startInternal

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

十一月 16, 2018 5:20:49 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-nio-8080"]

十一月 16, 2018 5:20:49 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-nio-8009"]

十一月 16, 2018 5:20:49 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 570 ms


写回答 关注

1回答

  • 暮女神
    2018-11-28 20:24:56

    相应的jar包放到WEB-INF/lib里了没

Struts2入门

本教程带你踏上Struts2学习之旅,对Struts2进行更深入讲解

95062 学习 · 456 问题

查看课程

相似问题