<html>
<body>
<%@ page import="java.util.*"%>
Time:<%=new java.util.Data()%>
</body>
</html>
I put it at
tomcat dir\webapps\myjsp\test\test.jsp.
But when I run it with http://localhost:8080/myjsp/test/test.jsp, I
got the following error, why?
Thanks,
ff
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server
Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for
JSPNote: sun.tools.javac.Main has been deprecated.
An error occurred at line: 4 in the jsp file: /test/test.jsp
Generated servlet error:
C:\JBuilder7\jakarta-tomcat-4.0.3\work\localhost\myjsp\test\test$jsp.java:63:
Class java.util.Data not found.
out.print(new java.util.Data());
^
1 error, 1 warning
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
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:2343)
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:1012)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:536)
Time:<%=new java.util.Data()%>
<assertive-and-not-nice>
READ YOUR FUCKING COMPILER ERROR MESSAGES.
</assertive-and-not-nice>
java.util.Data is the symbol that cannot be resolved - why ? Because it
doesn't exist.
I suspect java.util.Date is the one you want, but you'd know that if you
read your compile error messages.
--
Tony Morris
(BInfTech, Cert 3 I.T.)
Software Engineer
(2003 VTR1000F)
Sun Certified Programmer for the Java 2 Platform (1.4)
Sun Certified Developer for the Java 2 Platform
"Scott is homosexual" - Tony Morris, 2004
"Tony Morris" <dibb...@optusnet.com.au> wrote in message news:<c4t10a$hlc$1...@news.btv.ibm.com>...
So what, you took the SCF test and didn't pass?
Status and job qualifications on reply denotes denotes pompus.asshole.
Not to mention chronic lack of self esteem.
Why cant people just help politely if at all!!!!!!!!!!!!!
I didn't always do it, but I became tired of not putting anything, or an
alternative that I tried, which was to put a URL that provided a personal
introduction (since nobody bothered reading it anyway). I realised the risk
in doing so, that people such as yourself would make attempts to gain an
understanding of this behaviour by predicting personality traits (self
esteem, etc.). I am willing to accept this risk every so often, since I am
confident that it is only yourself who has been misled, and not others
(which I would otherwise believe is unfair and would usually require
correction).
Hope this clears it up for you.
I think you are.