SCJP 6 | SCWCD 5
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I read the JSP spec 2 times regarding this and it mentions that if you specify both type and class attributes of jsp:useBean tag, and if the object is found, then the object must be of the type specified by the type attribute, there is no compulsion that the object be of type specified by the class attribute...
...So the container should allow you to only access properties of Movable class and not Person class as the actual object might not be of type Person.
SCJP 6 | SCWCD 5
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
SCJP 6 | SCWCD 5
What's wrong? Where are you going? Stop! Read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|