TOMCAT配置问题,是TOMCAT坏了吗??
我的TOMCAT安装在D:\ProgramFiles\ApacheSoftwareFoundation\Tomcat5.0我的环境变量配置的是:CATALINA_BASE...
我的TOMCAT安装在D:\Program Files\Apache Software Foundation\Tomcat 5.0
我的环境变量配置的是:
CATALINA_BASE D:\Program Files\Apache Software Foundation\Tomcat 5.0
CATALINA_HOME D:\Program Files\Apache Software Foundation\Tomcat 5.0
ClassPath D:\Program Files\Java\jdk1.5.0_04\lib;D:\class;D:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet.jar;
JAVAHOME D:\Program Files\Java\jdk1.5.0_04
运行http://localhost:8080/正常
我把放在ROOT下面的a.jsp运行http://localhost:8080/a.jsp却报错
我a.jsp的编码很简单,而且放在别人的TOMCAT下可以运行。
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" >
<title>shiyan</title>
</HEAD>
<BODY>
<%out.println("HHH");
%>
</BODY>
</HTML>
可是我运行就报错
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:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
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:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
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.28 logs.
请问怎么回事??
我JDK配好了,没有问题的。JAVA和JAVAC都测试没有问题。PATH设置没有问题。 展开
我的环境变量配置的是:
CATALINA_BASE D:\Program Files\Apache Software Foundation\Tomcat 5.0
CATALINA_HOME D:\Program Files\Apache Software Foundation\Tomcat 5.0
ClassPath D:\Program Files\Java\jdk1.5.0_04\lib;D:\class;D:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet.jar;
JAVAHOME D:\Program Files\Java\jdk1.5.0_04
运行http://localhost:8080/正常
我把放在ROOT下面的a.jsp运行http://localhost:8080/a.jsp却报错
我a.jsp的编码很简单,而且放在别人的TOMCAT下可以运行。
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" >
<title>shiyan</title>
</HEAD>
<BODY>
<%out.println("HHH");
%>
</BODY>
</HTML>
可是我运行就报错
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:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
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:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
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.28 logs.
请问怎么回事??
我JDK配好了,没有问题的。JAVA和JAVAC都测试没有问题。PATH设置没有问题。 展开
展开全部
我可以肯定的告诉你,你没有配置JDK的path环境变量root cause
Unable to find a javac compiler;
这个语句都告诉你了!你要在环境变量在加上 path=D:\Program Files\Java\jdk1.5.0_04\bin我保证没问题了
Unable to find a javac compiler;
这个语句都告诉你了!你要在环境变量在加上 path=D:\Program Files\Java\jdk1.5.0_04\bin我保证没问题了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询