吴哥航空公司怎么样:JSP初学者求救!!第一个JSP程序

来源:百度文库 编辑:神马品牌网 时间:2024/05/02 12:17:26
什么都装好了,都能用了,到最后调试程序出错
程序index.jsp:
<html><body><center>
Now time is: <%=new java.util.Date()%>
</center></body></html>
这个文件放在webapps/myjsp目录下
最后http://localhost:8080/myjsp/index.jsp
出现以下提示:
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.

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

你没有安装jdk,或者没有在环境变量中配置jdk