jsp中一个很奇怪的初级问题
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
An error occurred at line: 129 in the jsp file: /classmanage/admin/adminmark_add.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:\Tomcat 5.0\work\Catalina\localhost\myproject\org\apache\jsp\classmanage\admin\adminmark_005fadd_jsp.java:176: ';' expected
out.write(">");
^
这个说明,javac还能找到,类也可以找到,但我将这个错误改正以后,反而出现以下错误:
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
No 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:285)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:232)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
我已经配置了环境变量java_home,path,classpath,而且已经将tools.jar,dt.jar拷到tomcat 5.0/common/lib下了,而且tomcat服务器重起了还几次,也没什么改变,不知问题出在哪