我的本地服务http://localhost:8080/index.jsp可以打开,我的JAVA_HOME and tomcat_home都配置好了,文件放在C:\Tomcat 5.0\webapps\ROOT下,是不是我用tomcat 5.0的原因,谢谢!!! <html> <head> <title>Hello World</title> </head> <body> <h3> simpal jsp programming </h3> <%--此注释不会在源代码中显示--%> <%@ page language="java" %> <%= "Hello World!"%> </body> </html> 下面是报的错误 : description :The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP. This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path.org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413) org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Unable to compile class for JSP No Java compiler was found to compile the generated source for the JSP 他不是说的很清楚了吗,没有找到javac,检查你的path
hello.jsp放在root下
java_home
tomcat_home配好就可以了
先看看http://localhost:8080/index.jsp能不能打开
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h3> simpal jsp programming </h3>
<%--此注释不会在源代码中显示--%>
<%@ page language="java" %>
<%= "Hello World!"%>
</body>
</html>
下面是报的错误 :
description :The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: Unable to compile class for JSPNo Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path.org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
No Java compiler was found to compile the generated source for the JSP
他不是说的很清楚了吗,没有找到javac,检查你的path