日期:2014-05-18  浏览次数:20686 次

Tomcat 配置
安装Tomcat   5.0能测试通过,但是运行出现以下错误
type   :Status   report

message:   /myjsp/firstjsp.jsp

description:   The   requested   resource   (/myjsp/firstjsp.jsp)   is   not   available.
(上面我已经将BOOT中的WEB_INF考到我的目录下)


将firstjsp.jsp考到BOOT文件夹下,出现以下错误
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.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或者没找到jdk路径
------解决方案--------------------
lz有没有在环境变量中配置JAVA_HOME?

Perhaps JAVA_HOME does not point to the JDK
------解决方案--------------------
JAVA_HOME指向路径不对,怎么配的?
------解决方案--------------------
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.