• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

retriveing DynaActionForm property of type HashMap in JSP

 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sir...
I just want to know how to access a DynaActionForm's say account property whose type is java.util.HashMap in a JSP PAGE.


sample code is here...

<form-bean name="accountinformation"
type="org.apache.struts.action.DynaActionForm">
<form-property name="account" type="java.util.HashMap"/>
</form-bean>

A HashMap object is set in the account in GetAccountInformationAction servlet...

((DynaActionForm)form).set("account", hashMapObj);

hashMapObj is an object of type HashMap having all customer information in form of name/value pair.

If i want to retrieve the the HashMap object.Wat code should i write in jsp to retrieve the HashMap object form the DynaActionForm.
I have used <logic:iterator> tag but its showing exception..

can't create iterator for this collection

Plz help me.....

Tx in advance

Take Care

Bye
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://struts.apache.org/userGuide/struts-logic.html#iterate
there are a couple of examples there...
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying..I will try dat. Stuffs which u hav provided is really of great help.
Bye
 
reply
    Bookmark Topic Watch Topic
  • New Topic