Oops -- you're right Kris -- thanks for the clarification.
Kris Schneider wrote:
Well, sort of. In the typical example of a mapped property (like the one Richard
provided), the map itself isn't exposed as a JavaBean property, so JSTL can't
get at the information it contains:
private final Map values = new HashMap();
public void setValue(String key, Object value) {
values.put(key, value);
}
public Object getValue(String key) {
return values.get(key);
}
So, in order for JSTL to get at that information, you have to expose the map as
a JavaBean property. For example, by adding a method like:
public Map getValues() {
return values;
}
Then JSTL can be used like:
<c:out value="${info.values.email}"/>
Quoting Bill Siggelkow <[EMAIL PROTECTED]>:
<c:out value="${info.value.email}"/>
-- or --
<c:out value="${info.value['email']}"/>
Richard Raquepo wrote:
hi,
i am converting some of the jsp's to jstl.
how do i convert this line to jstl:
<bean:write name="info" property="value(email)"/>
where getValue is defined as
HashMap values = new HashMap();
.....
public String get(String name){
String value = (String) values.get(name);
return value;
}
hoping for your immediate response.
thanks a lot.
-richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]