Hi, there

I'm trying to use EL tag lib, but got problem with c:out.

I have a action form bean, which include a map like this:

public class MyFormBean {
    protected HashMap map = new HashMap();
    public Object getProperty(String key) {...}
    public void setProperty(String key, Object value) {...}
}

and in JSP I have something like this:
<c:set var="data" value="${.....databean}"/>
<bean:write name="data" property="property(key)"/>

It works fine.

But in EL bean:write suppose to been replaced by c:out, so I change it to:
<c:set var="data" value="${.....databean}"/>
<c:out value="${data.property(key)}"/>

It doesn't work. Did I missed something? or c:out doesn't support mapped properties? I 
also tried make MyFormBean implement Map interface extend from dyncbean, it works fine 
with c:out. But that make it very complex, every time I need to new bean, I need to 
declare dynclass, and add all property names before I use them. I want to keep it 
simple.

Any advice?

Thanks

Wei

Reply via email to