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

not able to display arrayList properly using html:select

 
shanthi naidu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to display country names in <html:select>
able to get the list of values in an array but using the below code
not able to display them properly they are resulting like this
along with the angular brackets as a single list option...
but i want to display them in <html:select> as


i hope i explained my problem clearly

The Code i used in my JSP



Please suggest me what i have to do

Thanks,
Shanthi Naidu
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you're explicitly displaying the list (arrList), instead of each object of the iteration.

You could also use html:options or html:optionscollection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic