Newsgroup: it.comp.java
Titolo: JSP non lo compila !!

Uso Tomcat 4.1 in Linux Debian.
la pagina di tomcat iniziale parte regolarmante, ma provando il
codice seguente preso da un libro , non me lo vuole compilere ....
Prechè?!?!
-----------------------------------------------------
File time.jsp
<jsp:useBean id="formatter"  class="TimeFormatterBean"/>
<jsp:setProperty name="formatter"  property="date" value="<% new 
java.util.Date() %>"/>
<html>
  <head>
   <title>Date JSP</title>
  </head>
  <body>
   <h1>Date JSP</h1>
   <p>The current time is: <jsp:getProperty name="formatter" 
property="time"/> </p>
  </body>
</html>
------------------------------------------------------
TimeFormatterBean.java
import java.text.DateFormat;
import java.util.Date;
/** Questo JavaBean compone un orario a partire da una data completa. */
public class TimeFormatterBean
{
   /** Costruisce il compositore. */
    public TimeFormatterBean()
     {
      timeFormatter = DateFormat.getTimeInstance();
     }
   /** ProprietÃ  di sola scrittura che contiene la data completa.
   @param aDate la data da cui estrarre l orario */
    public void setDate(Date aDate)
     {
      theDate = aDate;
     }
   /** ProprietÃ  di sola lettura che contiene l orario.
   @return l orario composto */
    public String getTime()
     {
      String timeString = timeFormatter.format(theDate);
      return timeString;
     }
    private DateFormat timeFormatter;
    private Date theDate;
}
---------------------------------------------------
Questi gli errori che mi da tomcat quando carico time.jsp del browser
exception
org.apache.jasper.JasperException: TimeFormatterBean
	at 
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:183)
	at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:692)
	at org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:552)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1070)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:1076)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:232)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
	at org.apache.jasper.compiler.Generator.generate(Generator.java:1917)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:242)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
	at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	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.access$000(ApplicationFilterChain.java:98)
	at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
	at java.security.AccessController.doPrivileged(Native Method)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:484)
root cause
java.lang.ClassNotFoundException: TimeFormatterBean
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1443)
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)
	at 
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:181)
	at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:692)
	at org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:552)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1070)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:1076)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:232)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
	at org.apache.jasper.compiler.Generator.generate(Generator.java:1917)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:242)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
	at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	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.access$000(ApplicationFilterChain.java:98)
	at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
	at java.security.AccessController.doPrivileged(Native Method)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:484)
Grazie per l'aiuto.

 Grazie per l'aiuto.
Non trova la classe TimeFormatterBean.
L'hai messa in WEB-INF/classes ??
Hai rispettatto i packages ??
Ciao

    /** ProprietĆ  di sola lettura che contiene l orario.
