Apache tomcat安装会导致错误

时间:2016-02-08 18:07:08

标签: java tomcat server

我安装了jdk1.8,现在尝试安装apache tomcat。我跑的时候

C:\Program Files\apache\apache-tomcat-8.0.30\bin>startup 

它开始像

一样运行
C:\Program Files\apache\apache-tomcat-8.0.30\bin>startup
Using CATALINA_BASE:   "C:\Program Files\apache\apache-tomcat-8.0.30"
Using CATALINA_HOME:   "C:\Program Files\apache\apache-tomcat-8.0.30"
Using CATALINA_TMPDIR: "C:\Program Files\apache\apache-tomcat-8.0.30\temp"
Using JRE_HOME:        "C:\Program Files\Java\jre1.8.0_73"
Using CLASSPATH:       "C:\Program Files\apache\apache-tomcat-8.0.30\bin\bootstrap.jar;C:\Program Files\apache\apache-tomcat-8.0.30\bin\tomcat-juli.jar"

之后我尝试在浏览器中检查apache tomcat,如localhost:8080 并显示以下错误

HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

type Exception report

message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:176)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
    java.net.URLClassLoader.findClass(Unknown Source)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:62)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.30 logs.

Apache Tomcat/8.0.30

请告诉我如何解决这个问题。

1 个答案:

答案 0 :(得分:0)

验证您的JAVA_HOME是否指向正确的JDK。