• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Store arrayList into DropDownList

 
Shamsa Al Neyadi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

Guys I'm trying to store the ArrayList items into dropDownList , it created fields for them but they are empty.

this my code :



i tried for loop also , i faced the same problem.

help me please.

kind regards
 
zohaib khan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shamsa Al Neyadi,


You can use FOR loop to iterate over array list




- Thanks
Zohaib.
 
Shamsa Al Neyadi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i used it , but does not work !
BTW , i don't want to print the values of the arraylist , i want to store the arraylist items into dropdownlist.
 
Dhaval J. Patel
Ranch Hand
Posts: 90
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off you shouldnt be using scriptlets in jsp, makes it messy really.
Second, you are missing the value attribute in your option tag.
Third, you should post more information on what happens when you run the code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65125
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this JspFaq entry.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic