回 帖 发 新 帖 刷新版面

主题:tomcat下运行jsp出错啦!



小弟学jsp 时间不常,,,,

前两天装了jdk和tomcat 后(这两个安装都成功的),想在tomcat下建个目

录来

调试一个小程序。 在地址栏打入http://localhost:8080/myapp/22.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

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:83)
    org.apache.jasper.compiler.ErrorDispatcher.javacError

(ErrorDispatcher.java:315)
    org.apache.jasper.compiler.Compiler.generateClass

(Compiler.java:406)
    org.apache.jasper.compiler.Compiler.compile

(Compiler.java:463)
    org.apache.jasper.compiler.Compiler.compile

(Compiler.java:442)
    org.apache.jasper.compiler.Compiler.compile

(Compiler.java:430)
    org.apache.jasper.JspCompilationContext.compile

(JspCompilationContext.java:511)
    org.apache.jasper.servlet.JspServletWrapper.service

(JspServletWrapper.java:274)
    org.apache.jasper.servlet.JspServlet.serviceJspFile

(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service

(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service

(HttpServlet.java:810)


note The full stack trace of the root cause is available in the 

Apache Tomcat/5.0.25 logs.


--------------------------------------------------------------

------------------

Apache Tomcat/5.0.25
--------------------------------------------------------------

----------------

我的设置感觉没问题啊,不知道为什么会有这个错误,哪位大侠帮忙看

看啊!!!

回复列表 (共4个回复)

沙发

22.jsp是什么内容?

板凳

22.jsp 内容;
<html><body><center> 
dasassa
</center></body></html>

呵呵,问题解决了,可是花我半小时把jdk和tomcat 都重装了一遍!!!

3 楼

楼主可否详细告知你的tomcat 是怎么安装成功的啊?
tomcat5.0.28
我都累蒙了...

4 楼


$JAVA_HOME/lib/tools.jar from the JDK 
to the common/lib directory of the Tomcat server, followed by a 

Tomcat restart. 
你把JDK安装目录/lib下的tool.jar手动复制到TOMCAT安装目录/common/lib下,然后重启tomcat就OKAY了!

我来回复

您尚未登录,请登录后再回复。点此登录或注册