Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hash map getting null or only last value

arjun rampal
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am getting only last value from hashmap
codes are below.

Then I used iterator and getting
Required string is null or empty

jsp code

<bean efine id="a" name="b" property="c"/>
<bean efine id="e" name="b" property="d"/>
java.util.HashMap params = new java.util.HashMap();
session.setAttribute("paramsName", params);

action classs code
Map paramsName = new HashMap();

if (paramsName!=null)
{Iterator pIter = paramsName.keySet().iterator();
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic