报错信息如下(我已经在web.xml配置了filter):
-
java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter
-
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1324)
-
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1177)
-
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:
550)
-
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:
531)
-
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:
150)
-
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:
258)
-
at org.apache.catalina.core.ApplicationFilterConfig.
(ApplicationFilterConfig.java:
105)
-
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:
4603)
-
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:
5210)
-
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:
150)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1396)
-
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:
1386)
-
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)
解决方法一:
完成这三步启动 tomcat 问题就解决了。
参考原文地址:http://blog.sina.com.cn/s/blog_8ced01900101ba3f.html