假设我有以下 java 对象,我希望使用 el 在我的 jsp 中读取:
class A {
Map map = new HashMap();
int count;
String getAttribute(String attrName)
{
return map.get(attrName);
}
String getCount()
{
return count;
}
}
我可以打电话给计数${a.count}
但是如何使用 el 调用 getAttribute 呢?