This discussion is archived
1 Reply Latest reply: Jul 24, 2009 8:14 AM by 800303 RSS

Java Beans Problem in JSP

843807 Newbie
Currently Being Moderated
Hello,

I have two classes Person and student. There is Gen-Spec relation between them. i.e. the student class inherits from person class and person class is made a Java bean. Now in the JSP page I want to get the property of Person class through Student object.

The page gives the following error when I do that:
org.apache.jasper.JasperException: Cannot find any information on property 'fullName' in a bean of type 'Student'

I don’t know why this error is occuring. One possible reason come in my mind is that since the fullName property is in Person class and Student class inherit the Person class so the IDE is not considoring the Person as Bean object so, I’ve made the Person class also a Bean object. And inherit the Student bean object to person bean object but still this error occur. Please help me in resolving this error and guide me what I should do. Is this heppening due to inherutance.

The tamplet code is shown below

// Person.java
Import java.io.*;
Public class Person implements Serializable
{
     Private String fullName;
     
     //relevant setter and getter menthods
}

// Student.java
Import java.io.*;
Public class Stundent extends Person implements Serializable
{
     Private String level;
     
     //relevant setter and getter menthods
}