Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to put the http requests in a hashmap

Status
Not open for further replies.

rajpuri

Programmer
Apr 17, 2002
4
US
Dear Friends

how to put the http requests in a hashmap and access the hashmap using the
struts.

a small code example would be helpful.

Thank u..

pls kindly respond me ASAP.

raj
 
Do you mean the other way round, putting a Hashmap into request object, and retrieve it later in the process?

if so you put a HashMap to request object:
Code:
HashMap map = new HashMap();
map.put("1", "string 1");
request.setAttribute("yourMap", map);

You can than iterate the map by:

Code:
<logic:iterate id="element" name="yourMap">
Next element is <bean:write name="element" property="value"/>
</logic:iterate>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top