jsp can not find date

Discussion in 'Java' started by f, Apr 6, 2004.

  1. f

    f Guest

    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)
    f, Apr 6, 2004
    #1
    1. Advertising

  2. f

    Tony Morris Guest

    "f" <> wrote in message
    news:...
    > 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
    Tony Morris, Apr 6, 2004
    #2
    1. Advertising

  3. f

    zatoichi Guest

    f wrote:
    > 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()%>
    zatoichi, Apr 6, 2004
    #3
  4. f

    f Guest

    You are a sun certified fucker.

    "Tony Morris" <> wrote in message news:<c4t10a$hlc$>...
    > "f" <> wrote in message
    > news:...
    > > 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
    f, Apr 6, 2004
    #4
  5. f

    Liz Guest

    "f" <> wrote in message
    news:...
    > You are a sun certified fucker.


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

    >
    > "Tony Morris" <> wrote in message

    news:<c4t10a$hlc$>...
    > > "f" <> wrote in message
    > > news:...
    > > > 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
    Liz, Apr 6, 2004
    #5
  6. 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!!!!!!!!!!!!!
    "f" <> wrote in message
    news:...
    > You are a sun certified fucker.
    >
    > "Tony Morris" <> wrote in message

    news:<c4t10a$hlc$>...
    > > "f" <> wrote in message
    > > news:...
    > > > 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
    vivienne wykes, Apr 6, 2004
    #6
  7. f

    Tony Morris Guest

    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
    Tony Morris, Apr 7, 2004
    #7
  8. f

    Guest

    > I think youll find he is a sun certified asshole.

    I think you are.


    >
    > 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!!!!!!!!!!!!!
    > "f" <> wrote in message
    > news:...
    > > You are a sun certified fucker.
    > >
    > > "Tony Morris" <> wrote in message

    > news:<c4t10a$hlc$>...
    > > > "f" <> wrote in message
    > > > news:...
    > > > > 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
    , Apr 7, 2004
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    595
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,244
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    513
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    718
    Richard Heathfield
    Nov 8, 2003
  5. Matt
    Replies:
    11
    Views:
    404
    Aaron Bertrand [MVP]
    Nov 8, 2003
Loading...

Share This Page