Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to populate a drop down box built with Struts html tag dynamically with the iterator

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I'm trying to populate a select field with options coming from an array list. I cannot use optionsCollection because I have to assign an id to every option element (it's a requirement I cannot bypass). My idea was to use an iterator within the select tag, but i get an JSP compile exception. It has to do with the way I add the value attribute in the option element. Below is the code:

It doesn't even compile. It complains that codeBean cannot be resolved.

When I try:

There is another exception. Now it says there is a problem in the attribute codeBean.

Any suggestions? Thanks in advance for your time...
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You cannot have one custom tag nested inside another. <bean:write nested in <html option is not valid

What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic