未了情李娜歌词:JSDK和TOMCAT的问题!

来源:百度文库 编辑:高考问答 时间:2024/04/28 06:57:17
都配置好了 但是制作测试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

No Java compiler was found to compile the generated source for the JSP.
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.

--------------------------------------------------------------------------------

Apache Tomcat/5.0.16

高手指点!
jdk tomcat 都配置好了

测试成功

我简单的写了条测试下效果 代码如下<% @ page contentType="text/html;charset=gb2312" import="java.util.*"%>
<html>
<head>
<title>jsp test
</head>
<body>
<%out.println("测试页面)<br>";
date now = new date();
out.println(new date())
%></body>
</html>

org.apache.jasper.JasperException: Unable to compile class for JSP
你看到这个异常没有?这个异常一般是jsp文件编写错误,里面可能包含错误的代码。
当然,也有可能是你的jdk没有配置好。认真检查一下你的jdk配置。
还有,建议你装好之后用浏览器打开:http://localhost:8080
如果出现提示成功画面,那说明你一切安装完成,就是原来的JSP文件有问题。
一般要把jsp文件放在ROOT目录下才可以正常运行。

我想是你的jsp文件出现了错误了,,,