thanks. i just modified my code to expose the Map, then viola...
i can now start converting some of my jsp's to JSTL. thanks again guys... -Richard ----- Original Message ----- From: "Kris Schneider" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 2004 1:42 AM Subject: Re: converting bean:write to c:out > 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 > > -- > Kris Schneider <mailto:[EMAIL PROTECTED]> > D.O.Tech <http://www.dotech.com/> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]