jsp can not find date

F

f

here is my jsp:

<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)
 
T

Tony Morris

f said:
here is my jsp:

<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

<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
 
Z

zatoichi

f said:
here is my jsp:

<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)
Is this correct?

Time:<%=new java.util.Data()%>
 
F

f

You are a sun certified fucker.

Tony Morris said:
<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
 
V

vivienne wykes

I think youll find he is a sun certified asshole.

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!!!!!!!!!!!!!
 
T

Tony Morris

Generally speaking, you are right.
I put all that "bollocks" (if you will) on the bottom to achieve what I
consider answers to frequently asked questions about myself, since I use my
mail/news client for much more than simply replying to Usenet posts. For
example, I am often asked on motorcycle forums "What bike do you ride ?", or
from students that I teach at a university, "What degree do you have ?", or
by people in Java forums, "On what basis, do you claim that java.lang.String
is immutable ?" (The requirements of SCJP clearly stipulate that I should be
trusted in knowing this).

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.

http://xdweb.net/~dibblego

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top