Hi kongtao,
                      U have to write setAge(int person_age) because javabean functionality requires set and get of same datatype when it is deployed.
 
With Regards,
eSWAR.
 
-----Original Message-----
From: kongtao [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 27, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: int type property in javaBean

Hello everybody,
I don't sure I can use the integer type property in the javaBeans.
Today ,I completed  a simpe javaBean and give a simple method.
See following:
---------------------------------------------------
    int age;
    public void setAge(String person_age){
       age=Integer.parseInt(person_age);
    }
    public int getAge(){
        return age;
    }
---------------------------------------------------
Unfortunately,following error msg occurs:
<2002/7/27 �U��04��40��09��> <Error> <HTTP> <[WebAppServletContext(6922527,Defau
ltWebApp,/DefaultWebApp)] Servlet failed with Exception
java.lang.NoSuchMethodError: com.sabrina.javabean.PersonInfo.setAge(Ljava/lang/String;)
I was confused by this NoSuchmethodError.
Why?Can't I use the int type property in this javaBean.Pls help me.
Any help would be appreciated.
 

Reply via email to