Hello all,

I've got some problems accessing arrays and maps in the jsp-file.

In the Action class, the following objects are defined:

Hashtable <String,String> hash = new Hashtable<String,String>();
ArrayList <Hashtable <String,String>> list = new ArrayList <Hashtable
<String,String>>();

hash.put("key","value");
hash.put("key1","value1");

list.add(hash);

rq.setAttribute("hasht", hash)
rq.setAttribute("array", list);



In the jsp-file:

Access with iterate through Arraylist:
<logic:iterate name="array" id="hashtable" >
        <bean:write name="hashtable" property="key"/>
</logic:iterate>



direct access of the value with the key in the hashtable:
<bean:write name="hasht" property="key - don't know">

The key could come from an method (Something like some_other_list.get(1)
e.g.) or a literal like key1 as defined in the example above.


I would be very glad, if anybody could solve my problem with directly
accessing Hashtables in jsp-file.


Kind regards,
Andreas Hartmann


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to