IE错误提示如下:
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:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:418)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
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)eclipse里提示:
严重: Error compiling file: /C:/Tomcat 5.0/work/Catalina/localhost/UpFile//org/apache/jsp\SelFile_jsp.java     [javac] Compiling 1 source file错误: 读取 C:\Java\jdk1.5.0_05\jre\lib\ext\_desktop.ini 时出错;error in opening zip file
注意: C:\Tomcat 5.0\work\Catalina\localhost\UpFile\org\apache\jsp\SelFile_jsp.java 使用了未经检查或不安全的操作。
注意: 要了解详细信息,请使用 -Xlint:unchecked 重新编译。
1 错误我看了很多资料都说可能是jdk没配置好,我写了个helloworld类可用javac编译.java文件,使用java指令运行正确啊java -version的结果jdk和jre的版本也是一样的啊!这表明我的jdk配置是正常的吧?还有可能是用jre运行的,我检查了在eclipse中window->preference->java->installed jres的界面内我选的确实是jdk1.5而不是jre1.5,tomcat的jdk选项也是jdk1.5啊

解决方案 »

  1.   

    错误提示表示没找到java编译器。
    解决方法在提示中也有: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.还有一种解决方法:可以看看tomcat的属性中的java属性页的java classpath中是否包含tools.jar ,如果没有,请包含进去