I'm missing the package definition in Counter.java.

To use a bean in JSP, thebean must belon to a package:

The statement
<useBean id="myBean" class="Counter"/ ...>
will look for a class named counter in the package of 
the current class (which is the generated servlet).
To whick package the generated servlet belongs is 
completely up to the jsp engine.



> -----Ursprüngliche Nachricht-----
> Von: Jack Li [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 22. März 2001 17:09
> An: [EMAIL PROTECTED]
> Betreff: RE: Does JDK1.3 works with Tomcat?
> 
> 
> I didn't use special methods. the java codes are very simple 
> and listed
> below:
> ------------------------------------
> import java.io.Serializable;
> public class Counter implements Serializable{
>     int count = 0;
> 
>     public Counter(){}
> 
>     public int getCount(){
>         count++;
>         return this.count;
>     }
> 
>     public void setCount(int count){
>         this.count = count;
>     }
> }
> -------------------
> 
> Here is the directory structure:
> 
> web -- homepages -- jack -- counter.jsp
> web -- web-inf   -- classes -- counter.class
> 
> The error message is:
> Class homepages.jack.Counter not found in type declaration.
> 
> Please help
> Thanks,
> Jack Li
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Ying Ho [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Does JDK1.3 works with Tomcat?
> 
> 
> JDK 1.3 does work with tomcat. Your bean must be using some 
> specific jdk
> 1.1.*
> methods that is not supported in jdk 1.3 (and most likely 
> also jdk 1.2).
> 
> ----- Original Message -----
> From: "Jack Li" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 22, 2001 4:52 PM
> Subject: Does JDK1.3 works with Tomcat?
> 
> 
> > Hello,
> > Does JDK1.3 works with tomcat. My beans do not work with 
> JDK1.3. Error
> > message says can't find the class. But all these beans 
> works fine with
> > JDK1.1.8. Any ideas?
> >
> > Thanks,
> > Jack Li
> >
> 
> 

Reply via email to