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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
I agree. Here's the link: http://aspose.com/file-tools
subject: how to use select tag using struts
Similar Threads
declaring body-content as scriptless
Populating each row of a Column with combo boxes containing values from database
problem with calling jsp page on evenet onSelect/onClick
Struts and JSP
Any Suggestion about a small project?