File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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:
subject: how to use select tag using struts
It's not a secret anymore!