IT人
相关图书

自己写的一端JSP 老是调试不行

所属分类:Java Web 开发
-----------------------------------------

<%@page contentType="text/html;charset=gb2312" import="Java.util.Date"%>
<% Date date=new Date();%>


出现提示:
Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP注意:sun.tools.javac.Main 已过时。

C:\Apache Tomcat 4.0\work\Standalone\localhost\www\Test$jsp.java:3: 在 import 中未找到类 Java.util.Date。
import Java.util.Date;
       ^
1 个错误, 1 个警告

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:595)



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

java.util.Date吧

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

J小写,lz用的是什么年代的jdk啊?都报过时了。。

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

第一行的Java.util.Date改为小写,或者
<% Date date=new Date();%>改为<% java.util.Date date=new java.util.Date();%>

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

java要小写

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

<%@page contentType="text/html;charset=gb2312" import="java.util.Date"%>

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

import="java.util.Date"

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

java 小写 后
 出现以下信息
org.apache.jasper.JasperException: Unable to compile class for JSP注意:sun.tools.javac.Main 已过时。

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

换一个tools.jar包,感觉你的tomcat有点老哦
相关问题
    Copyright ◎ 1998 - 2007 编程资料网 All Rights Reserved