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()L