idea社区版tomcat6启动java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager

idea社区版开发的时候用的tomcat7,然后社区版要求tomcat6,换之后访问项目的时候报了这个错。
原因是原来用tomcat7编译的项目,在换到tomcat6之后没有重新编译

另外会引发jsp解析问题,网上寻找很多都说servlet.jar,jsp.jar冲突,但是我项目并没有冲突了还是下面报错

Servlet.service() for servlet [jsp] in context with path [/] threw exception [java.lang.LinkageError: loader constraint violation: when resolving interface method “javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/login_jsp, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method’s defining class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature] with
root cause

java.lang.LinkageError: loader constraint violation: when resolving interface method “javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;” the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/login_jsp, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method’s defining class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature

根本原因

解决方案一(推荐):

1.清空对应Tomcat中的work目录、还有C盘生成的work
2.C:\Users\DELL.SmartTomcat\web

解决方案二:

重新部署项目,项目名称不能一样,快速解决!(但不推荐,因为以后名字写一样还是会报这种错)

idea社区版tomcat6启动java.lang.ClassNotFoundException: org.apache.tomcat.InstanceManager