File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Multi Select Drop Down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multi Select Drop Down" Watch "Multi Select Drop Down" New topic

Multi Select Drop Down

BuccaneerAnirban Bhattacharjee

Joined: Nov 23, 2006
Posts: 9
Hi people,
can some one help me , how can i Create Dropdown with multiple selection in struts. How can I retireve all the selected values in my form bean.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Specify multiple="true" with the <html:select> tag. Then Make sure the property refers to an array. The array should generally be String[], but it could also be int[]. Example:

Then in your JSP:

Consultant, Sima Solutions
I agree. Here's the link:
subject: Multi Select Drop Down
It's not a secret anymore!