Apache Tomcat 错误

Apache Tomcat 错误

访问时看到以下错误localhost:8080

HTTP Status 500 -

type Exception report

message

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(Unknown Source)
    org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
    org.apache.jasper.servlet.JspServlet.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(Unknown Source)
root cause

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
    java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    java.security.AccessController.doPrivileged(Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
    org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source)
    org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
    org.apache.jasper.servlet.JspServlet.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.23-gentoo logs.

Apache Tomcat/7.0.23-gentoo

答案1

我刚刚遇到了这个问题。如果你使用的是 Windows 机器,请确保添加了指向你的 CATALINA_HOME 环境变量<tomcatdirectory>\bin

答案2

错误说

java.lang.ClassNotFoundException

似乎缺少一些 lib 文件

或者

Servlet 类路径输入错误

答案3

对于 Java-EE 项目转换为 Maven 项目jstl 依赖pom.xml

  • 右键单击相关项目
  • 打开属性
  • 点击部署组件
  • 点击添加
  • 选择 Java 构建路径条目
  • 选择 Maven 依赖项

相关内容