Hello,

I always use the html:options tag and it works fine; try the following:

(there is a type error in your example)

<html:select property ="gender">
    <html:option value="m">m</html:option>
    <html:option value="f">f</html:option>
</html:select>

ofcourse, in the database you should have the values f or m

Jan


"Goldy J" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
> I have a JSP in which there are number of dropdown along with text boxes.
I am using struts tag lib for getting the value when I submit the form.
> The problem is when I try to populate the dropdown in th JSP with the data
that i get from the databse .
> For example I have dropdown for gender with option M,F.Now when I select
and submit it I am OK but when I query and get the value from DB It doesnt
set to appropiate value but always with the deafult M. same for others
dropdowns.
> Iam using the following in my JSP
>
> <html:select property ="gender"><htrml:option
value="m"></html:option><htrml:option value="f"></html:option></html:select>
>
> In formbean
> String gender;
> setGender{};
> getGender{};
>
> Any help will be highly appreciated Thanks in advance.
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to