以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Java/Eclipse 』  (http://bbs.xml.org.cn/list.asp?boardid=41)
----  求助  web客户端显示问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=41&rootid=&id=22837)


--  作者:zhaorongjuan
--  发布时间:10/8/2005 8:19:00 PM

--  求助  web客户端显示问题
我找j2ee指南上的例子
运行 localhost:8080/converter
出现如下错误:
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:87)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:311)
 org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:378)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:421)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:402)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:512)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:262)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:324)
 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
 java.security.AccessController.doPrivileged(Native Method)
 javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
 org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
 org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

困扰了好几天了,请大家帮帮忙!


--  作者:binaryluo
--  发布时间:10/9/2005 9:27:00 PM

--  
以下是引用zhaorongjuan在2005-10-8 20:19:00的发言:
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.

答案不是就在这里了么,叫你把jdk根目录下的lib/tools.jar拷贝到tomcat根目录下的common/lib目录下,然后重启tomcat.


--  作者:lywzd
--  发布时间:11/2/2005 9:27:00 AM

--  
楼上说的很对,一般这样的情况 看看错误提示都可以解决的。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
23.438ms