问题如下:
jsp文件
<%@ page contentType="text/html;charset=GBK"%>
<html>
<body>
<%
String str="hello world!";
session.setAttribute("Greeting",str);
out.print((String)session.getAttribute("Greeting"));
%>
</body>
</html>我的环境变量配置:
classpath配置D:\Tomcat5.0\common\classes;D:\Tomcat5.0\common\lib;D:\Tomcat5.0\common\lib\servlet-api.jar;D:\Tomcat5.0\common\lib\jsp-api.jar;D:\jdk142\lib\tools.jar;D:\jdk142\lib\dt.jar
PATH的配置
D:\jdk142\bin;D:\jdk142;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\winnt\system32;c:\winnt\system32\wben
有java_home和CATALINA_HOME的配置.执行后显示错误如下:HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage 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.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28什么问题,怎么解决呢?请各位大侠赐教,不胜感激。本人刚刚开始学习jsp.
jsp文件
<%@ page contentType="text/html;charset=GBK"%>
<html>
<body>
<%
String str="hello world!";
session.setAttribute("Greeting",str);
out.print((String)session.getAttribute("Greeting"));
%>
</body>
</html>我的环境变量配置:
classpath配置D:\Tomcat5.0\common\classes;D:\Tomcat5.0\common\lib;D:\Tomcat5.0\common\lib\servlet-api.jar;D:\Tomcat5.0\common\lib\jsp-api.jar;D:\jdk142\lib\tools.jar;D:\jdk142\lib\dt.jar
PATH的配置
D:\jdk142\bin;D:\jdk142;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\winnt\system32;c:\winnt\system32\wben
有java_home和CATALINA_HOME的配置.执行后显示错误如下:HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage 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.
--------------------------------------------------------------------------------Apache Tomcat/5.0.28什么问题,怎么解决呢?请各位大侠赐教,不胜感激。本人刚刚开始学习jsp.
解决方案 »
- 查询结果导出到Excel
- fjsp网页调用js文件出现问题(总提示页面有错误),各位帮我看一下。附上源码
- 给300分来求取这个问题的解答方法!!!
- 人家說的沒錯,真正的高手是不來CSDN的!!!
- iframe 标签
- 配置Struts tiles时报错: does not start with a "/" character
- jsp checkbox问题
- struts2,级联内容的查询与显示问题,请高手看看!!!
- 从JSP传数据的到JAVABEAN里是怎么回事?
- 我的jdk131在使用的时候,提示错误Exception in thread "main" java.lang.NoClassDefFoundError: StringTest?
- 如何得到多个下拉菜单的值
- 怎样从一个树中得到结点的值?
com.sun.tools.javac.Main 对应的路径不对
D:\jdk142\jre\lib\rt.jar;.;
在试试吧.