Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jsp can not find date

0 views
Skip to first unread message

f

unread,
Apr 5, 2004, 8:53:35 PM4/5/04
to
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)

zatoichi

unread,
Apr 5, 2004, 9:32:02 PM4/5/04
to
Is this correct?

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

Tony Morris

unread,
Apr 5, 2004, 9:24:21 PM4/5/04
to

"f" <ffu...@yahoo.com> wrote in message
news:8f4ce98a.04040...@posting.google.com...

<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


f

unread,
Apr 6, 2004, 12:08:46 PM4/6/04
to
You are a sun certified fucker.

"Tony Morris" <dibb...@optusnet.com.au> wrote in message news:<c4t10a$hlc$1...@news.btv.ibm.com>...

Liz

unread,
Apr 6, 2004, 3:50:37 PM4/6/04
to

"f" <ffu...@yahoo.com> wrote in message
news:8f4ce98a.04040...@posting.google.com...
> You are a sun certified fucker.

So what, you took the SCF test and didn't pass?

vivienne wykes

unread,
Apr 6, 2004, 6:49:25 PM4/6/04
to
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!!!!!!!!!!!!!

Tony Morris

unread,
Apr 6, 2004, 7:57:16 PM4/6/04
to
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

home...@yahoo.com

unread,
Apr 7, 2004, 1:26:18 AM4/7/04
to
> I think youll find he is a sun certified asshole.

I think you are.

0 new messages