Topic: 哭!用eclipse开发jsp的高手请进啊

  Print this page

1.哭!用eclipse开发jsp的高手请进啊 Copy to clipboard
Posted by: jn9211
Posted on: 2004-12-25 22:22

我的eclipse版本是3.0.1,tomcat版本是5.30 当
在地址栏中输入http://localhost:8888/Tomcat_test/Hello.jsp就运行正常,
但是如果输入 http://localhost:8888/Tomcat_test/formjsp1.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
  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:439)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
  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:802)

root cause

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
  org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
  org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929)
  org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
  org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:497)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
  org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
  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:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
我的Hello.jsp和formjsp1.jsp位于相同的路径下
谁能帮帮我啊。

2.Re:哭!用eclipse开发jsp的高手请进啊 [Re: jn9211] Copy to clipboard
Posted by: scud
Posted on: 2004-12-26 00:24

设定JAVA_HOME变量

把java的bin目录加到path变量里

3.Re:哭!用eclipse开发jsp的高手请进啊 [Re: jn9211] Copy to clipboard
Posted by: chengbd
Posted on: 2004-12-26 21:23

把tools.jar复制到tomcat的lib目录中试试

4.Re:哭!用eclipse开发jsp的高手请进啊 [Re: jn9211] Copy to clipboard
Posted by: lele
Posted on: 2004-12-27 10:03

前几天碰到同样的报错,将tools.jar复制到tomcat的lib目录中也不行
发现原因是用的jdk5.0,安装tomcat自动指向的jvm是jre5.0目录,重新安装,改为jdk5.0目录后运行正常

5.Re:哭!用eclipse开发jsp的高手请进啊 [Re: jn9211] Copy to clipboard
Posted by: chengbd
Posted on: 2004-12-27 20:55

有道理


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923