tomcat啟動(dòng)報(bào)錯(cuò) java.lang.ClassNotFoundException: org.apache.jsp.index_jsp](https://www.cnblogs.com/yingsong/p/6550148.html)
項(xiàng)目運(yùn)行一直很平穩(wěn),但是換了tomcat之后打開(kāi)jsp網(wǎng)頁(yè)時(shí)就報(bào)錯(cuò),描述如下:
1. 錯(cuò)誤描述
打開(kāi)jsp網(wǎng)頁(yè)時(shí)報(bào)錯(cuò)
java.lang.NullPointerException
org.apache.jsp.WEB_002dINF.pages.imagecheck.test_jsp._jspInit(test_jsp.java:22)
或 java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
2. 原因
由于tomcat 和 項(xiàng)目 中都有 servlet-api.jar 和 jsp-api.jar,換了tomcat之后,tomcat中的jar版本及編譯的jdk版本不同,導(dǎo)致沖突
版本查看,請(qǐng)看下圖

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
X-Compile-Source-JDK: 1.6
X-Compile-Target-JDK: 1.6
Name: javax/servlet/jsp/
Specification-Title: Java API for JavaServer Pages
Specification-Version: 2.2
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet.jsp
Implementation-Version: 2.2.FR
Implementation-Vendor: Apache Software Foundation
1.檢查你的項(xiàng)目中是否存在jsp-api.jar,jstl-api.jar,servlet-api.jar。
2.web.xml文件配置錯(cuò)誤。
3.版本沖突。