求救,重新配置了N遍jsp运行环境,出现了同一个怪现象!急急
求救,重新配置了N遍jsp运行环境,出现了同一个怪现象!
各们我今天用:j2sdk-1_5_0-beta-windows-i586.exe + jakarta-tomcat-5.0.28.exe
j2sdk-1_4_2_08-windows-i586-p.exe + jakarta-tomcat-5.0.28.exe
配置JsP运行环境好几次都出现了同一个怪现象.其中环境变量配置如下:
classpath=.;C:\j2sdk1.4.2_08\lib\dt.jar;C:\j2sdk1.4.2_08\lib\tools.jar;C:\Tomcat 5.0
\common\lib
path=C:\j2sdk1.4.2_08\bin;C:\Tomcat 5.0\bin
java_home=c:\j2sdk1.4.2_08;
tomcat_home=C:\Tomcat 5.0;
全部配置好之后,运行http://127.0.0.1:8080 可以出现tomcat的欢迎界面.
因为我的C:\Tomcat 5.0\webapps\ROOT目录里有两个我写的文件(a.jsp,b.jsp);
其中a.jsp中的内容为: "测试一个情况如何? ".
测试http://127.0.0.1:8080/a.jsp 则可以显示但全是乱码.
b.jsp中的内容为: <%@ page contentType= "text/html;charset=GB2312 "%>
<%@ page import= "java.util.* "%>
<HTML>
<BODY>
<P>
现在的时间是:
<% Date date=new Date();
%>
<BR>
<%=date%>
</BODY>
</HTML>
测试http://127.0.0.1:8080/a.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
An error occurred at line: 7 in the jsp file: /1.jsp
Generated servlet error:
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\_1_jsp.java:51: illegal character:
\12288
銆?銆?
^
An error occurred at line: 7 in the jsp file: /1.jsp
Generated servlet error:
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\_1_jsp.java:51: illegal character:
\12288
銆?銆?
^
2 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError
(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
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.
------------------------