In an Action that forwards to your form jsp, you do something like this:

  ArrayList flavours = new ArrayList();
  flavours.add(new LabelValueBean("Vanilla", "0"));
  flavours.add(new LabelValueBean("Strawberry", "1"));
  flavours.add(new LabelValueBean("Chocolate", "2"));
  flavours.add(new LabelValueBean("Neopolitan", "3"));
  request.setAttribute("FLAVOURS", flavours);

Then in your form jsp you can access the collection like this:

  <html:select property="flavour">
    <html:options collection="FLAVOURS" property="value"
labelProperty="label"/>
  </html:select>

Steve


> -----Original Message-----
> From: Yinti, Deepak [mailto:[EMAIL PROTECTED]
> Sent: May 27, 2003 12:58 PM
> To: Struts Users Mailing List
> Subject: <HTML:OPTION> from bean to JSP
>
>
>
> I am new to struts framework. Can somebody let me know ,how to get data
> from bean into <html:option> which I am using my jsp page
> Thanks
> Deepak
>
>
> This e-mail may contain confidential or privileged information.  If you
> think you have received this e-mail in error, please advise the sender by
> reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna
>
> ---------------------------------------------------------------------
> 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]

Reply via email to