• 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

Collections in Struts jsp

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've a value object, which returns a id and email Collection.

My action class will put the VO into the actionForm and then into request scope.
On my jsp, I can display the id by using <html:text property=vo.id>. However, if I use <html:text property=vo.id>, it will not display my email values.
how do i display the email collection, it should be able to display 1 textbox for each value.
Eg. if my Email has value abc@yahoo.com, abc@abc.com. then the display will be something like this:
<input type=text value=abc@yahoo.com name=??>
<input type=text value=abc@yahoo.com name=??>
pls help, thanks!
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either use logic:iterate or the JSTL forEach. See this article: http://www-106.ibm.com/developerworks/java/library/j-jstl0318/
 
reply
    Bookmark Topic Watch Topic
  • New Topic