This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes not able to display arrayList properly using html:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "not able to display arrayList properly using html:select" Watch "not able to display arrayList properly using html:select" New topic
Author

not able to display arrayList properly using html:select

shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
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

Joined: Sep 29, 2008
Posts: 12617

Because you're explicitly displaying the list (arrList), instead of each object of the iteration.

You could also use html:options or html:optionscollection.
 
wood burning stoves
 
subject: not able to display arrayList properly using html:select