This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes HTML:SELECT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HTML:SELECT" Watch "HTML:SELECT" New topic


Java Rancher

Joined: Mar 27, 2006
Posts: 1

I need to retrieve the value selected in the html:select option. How should I code for Getter and Setter methods in the form bean for the html:select option.

My code in the jsp is as follows
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There's nothing special about a single-value select statement. You code a getter and setter for a property of type String, just as you would with any other ActionForm property. In this case, getSelectedCounty, and setSelectedCounty.

Consultant, Sima Solutions
I agree. Here's the link:
subject: HTML:SELECT
Similar Threads
change font size in struts
for loop in select struts tag
Help me regarding select value in html:select...
how to set option to default ?
bean:message tag in option tag. is there a solution?