谁能解决???????
新手问题,但谁能帮忙解决?(有关JSP配置) |
系统是: Microsoft Windos Server 2003 Enterprise Edition JDK是:j2sdk-1_5_0-beta-windows-i586.exe Tomcat是:jakarta-tomcat-5.0.28.exe(安装的时候 我选择“Full”安装 JVM路径 为:C:\Program Files\Java\j2re1.5.0\bin\client\jvm.dll) 安装路径:D:\j2sdk1.5.0和D:\Tomcat 5.0 下面是配置信息: CATALINA_BASE D:\Tomcat 5.0; CATALINA_HOME D:\Tomcat 5.0; JAVA_HOME D:\j2sdk1.5.0 ClassPath .;D:\j2sdk1.5.0\lib\dt.jar;D:\j2sdk1.5.0 \lib\tools.jar;D:\j2sdk1.5.0\jre\lib\rt.jar;D:\Tomcat 5.0 \common\lib\servlet-api.jar; Path D:\j2sdk1.5.0\bin; ================================= 1.到Tomcat的安装目录的webapps目录; 2.在webapps目录下新建一个目录,起名叫myapp; 3.myapp下新建一个目录WEB-INF,注意,目录名称是区分大小写的; 4.WEB-INF下新建一个文件web.xml,内容如下: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";> <web-app> <display-name>My Web Application</display-name> <description> A application for test. </description> </web-app> 5.在myapp下新建一个测试的jsp页面,文件名为index.jsp,文件内容如下: <html><body><center> Now time is: <%=new java.util.Date()%> </center></body></html> 6.重启Tomcat 7.打开浏览器,输入:http://localhost:8080/myapp/index.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 org.apache.jasper.compiler.DefaultErrorHandler.javacError (DefaultErrorHandler.java:97) ........(省略) 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:106) ........(省略) 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.28 logs. ---------------------------------------------- Apache Tomcat/5.0.28 ============================= 为什么回这样?为什么org.apache.jasper.JasperException: Unable to compile class for JSP和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?请问:为什么不能运行?(在测试http://localhost:8080/的时候已经出现小猫了) |