Hi,
whenever we user type and class in the method
and if the bean is not available in the defined scope of the jsp:useBean,
The bean shall be instantiated by the container.
So if we use something like this.
<jsp:useBean id="person" type="foo.Person" class="foo.Employee"> <jsp:setProperty name="person" property="*" /></jsp:useBean>
The code in the jsp would be..
foo.Person person = new foo.Employee();
Now when the setProperty is called the Parameters of the form fields are matched for the attributes in the class but the mutator methods are used.
for example,
the form has empID defined in the Employee class so,
the setEmpID will be called on the person(object).
As you know the methods are called based on the constructor used and not on the type of the Object,
I hope I have helped in understanding the concept.
cheers
SCJP,SCWCD1.4
Sami