I guess the problem IS the fact that the type on elements in the list not being the correct type.
public class Parent {
private String parent = "parent";
public String getParent() {
return parent;
}
public void setParent(String parent) {
this.parent = parent;
}
}
public class Child extends Parent{
private String childName = "child";
public String getChildName() {
return childName;
}
public void setChildName(String childName) {
this.childName = childName;
}
}
If you do:
List<Parent> list = new ArrayList<Parent>();
list.add(new Child());
list.get(0).getChildName();
It will not build, you have to cast the Object to the correct type:
((Child)list.get(0)).getChildName();
Same thing for jsp files.
--
Gustavo Felisberto.
WIT-Software, Lda
Coimbra (Portugal), San Jose (California)
Phone: +351239801030
Web: http://www.wit-software.com
signature.asc
Description: OpenPGP digital signature

