You can create a bean using LabelValueBean in which the label will be male, female and the value will be 1, 2. In your jsp you do the following <html:select property="form-property-name" > <html:optionsCollection name="bean-name" value="value" label="label" /> </html:select>
On submit, your form-property-name will have the values 1 or 2 depending on the selection. Vijaya -----Original Message----- From: news [mailto:[EMAIL PROTECTED] Behalf Of Randy Kennedy Sent: Saturday, May 07, 2005 1:58 AM To: user@struts.apache.org Subject: Any way to retrieve the index of html:select? I was wondering if there is any way to retrieve the selection index of the <html:select> during the action. The value that I'm storing is the coded value for the description that it represents (e.g. 1 for male, 2 for female). Instead of taking the value and hitting the database, I would like to take the selection index and use that to pull the information out of a List that is stored as a session variable. -- Randy Kennedy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]