wood burning stoves 2.0*
The moose likes Struts and the fly likes how to use select tag using struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use select tag using struts" Watch "how to use select tag using struts" New topic

how to use select tag using struts

mahendra kumar

Joined: May 24, 2005
Posts: 2
plz guide me how to use ths select tag .
for every options in select tag should i write the bean in actionform.

plz guide me for ths code
<select name="product_id" size="1">
<option ">Sprocket</option>
<option >Cog</option>

for this html code .
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The best way to do it is to put all the options in a List or Set and then give the HttpSession a reference to it using session.setAttribute().

You would then use the html:select and htmlptions tags to build the select control.

See the following link for more information on how to use these tags:

[ May 24, 2005: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
GeeCON Prague 2014
subject: how to use select tag using struts