tomcat HTTP Status 500 - 错误

来源:百度知道 编辑:UC知道 时间:2024/06/18 12:55:22
在地址栏输入http://localhost:8080 能看见默认的index.jsp文件 但打开自己的jsp就有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: Unable to compile class for JSP
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath
Perhaps JAVA_HOME does not point to the JDK

答案就是你的环境变量没设置好.
要不你把rt.jar加到lib里也可以.