tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Trasuk" <stratus...@on.aibn.com>
Subject RE: JSP, easy question !
Date Fri, 31 Aug 2001 00:55:36 GMT
The <jsp:directive.page ...> style is for xml-formatted JSP pages.
Try <%@page import="java.util.Date" %>

I know the xml format doesn't work in Tomcat 3.x, although it does work
under WebSphere.  As I understand it, it should only work if the page
includes an xml declaration and dtd reference, but I've heard opinions that
it's a feature that's missing in Tomcat 3.x and is in Tomcat 4.0.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

> -----Original Message-----
> From: Gustavo Mejia [mailto:gmejia@infotec.com.mx]
> Sent: Tuesday, August 28, 2001 6:51 PM
> To: tomcat-user@jakarta.apache.org
> Subject: JSP, easy question !
>
>
> 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_000
> 2ejspejemplo2_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(JasperLoader1
> 2.java:146)
>
>  at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
>  at
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfN
> ecessary(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(ContextM
> anager.java:797)
>
>  at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>  at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:210)
>
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.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