You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jalal udeen <ja...@gmail.com> on 2007/05/09 12:23:02 UTC
hashmap
hi all
how to retrieve values from the HashMap
i have set it as
* hashMap*.put(*new* Integer(questionId),*new*Integer(
testDAO.getMarks(catid, typeid, patternid)));
how to getthese values again
thanks
jalaludeen
Re: hashmap
Posted by Lance <la...@marketpipe.com>.
Hi, I'm making the assumption that you are using struts1 and you want to
access the map in a struts tag.
I couldn't find a way of accessing properties mapped by anything else
but a string
Therefore, try
hashMap.put(String.valueOf(questionId), new
Integer(testDAO.getMarks(catid, typeid, patternid)));
In your jsp you can get it by
<html:text name="bean" property="hashMap(7)" />
@see http://struts.apache.org/1.x/struts-taglib/indexedprops.html
Cheers,
Lance.
jalal udeen wrote:
> hi all
>
>
> how to retrieve values from the HashMap
> i have set it as
>
>
>
> * hashMap*.put(*new*
> Integer(questionId),*new*Integer(
> testDAO.getMarks(catid, typeid, patternid)));
>
> how to getthese values again
>
>
>
> thanks
>
> jalaludeen
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org