• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

howto make html:link dynamic select item of map ?

Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi good day,

i have a hashmap which hold the information for menu name, and it look like following :

which may result as follow :

then i have a jstl foreach loop for create link as following

this created link is fine if i have hard code it with
request.setAttribute("menu1", "menu1");
request.setAttribute("menu2", "menu2");

and the result will show mke the link pass a parameter to other page which is something like this "menu1.do?menuname=menu1",

but my problem is , i try to avoid hardcode it into request, and prefer to make it dynamically when i have a menu name with "menu1", it will go Hashmap find the key for "menu1" and insert into "paramName" property

can someone guide me how to do so ? thank you
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic