tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Ulbright <m...@pelemele.com>
Subject Re: JSP, easy question !
Date Tue, 28 Aug 2001 23:32:41 GMT
i use this to import the Date functionality.

<%@ page import ="java.util.Date" %>

> Hello everyone,
> 
> I am starting with JSP's, and I got a problem, I know it is an easy
> question, I hope you could help me, well.. I have the next code:
> 
> <jsp:directive.page import="java.util.Date"/>
> <HTML>
> <HEAD><TITLE>Hello World JSP Example w/Current Time</TITLE></HEAD>
> <BODY>
> Hello World. The local server time is <%= new Date() %>.
> </BODY>
> </HTML>
> 
> and I got the error:
> 
> org.apache.jasper.JasperException: No se puede compilar la clase para
> JSPC:\tomcat\work\localhost_8080%2Fjsp\_0002fejemplo_00032_0002ejspejemplo2_jsp_0.java:59:
> Class Date not found.
>                 out.print( new Date() );
>                                ^
> 1 error
> 
>  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:254)
>  at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
>  at
> org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
> 
>  at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
>  at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
> 
>  at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
> 
>  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
> 
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>  at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> 
>  at org.apache.tomcat.core.Handler.service(Handler.java:286)
>  at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>  at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
> 
>  at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>  at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
> 
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> 
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> 
>  at java.lang.Thread.run(Thread.java:484)
> 
> 
> Thanks a lot !!
> 
> 
> --
> Gustavo Mejía Mora
> INFOTEC
> Tel: 5624 28 00
> Ext: 253
> 
> 
> 


Mime
View raw message