Hi,
   Thanx for reply, but I want to do it using the select custom tag in the
struts framework.

-gg
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Stefan Bushev
Sent: Wednesday, September 27, 2000 2:43 AM
To: [EMAIL PROTECTED]
Subject: Re: Select tag in Struts


ok, lets guess, that you have an array for abbrevs and array for names:

so ..
<% myAbbrevs[0] = "AZ";
   myAbbrevs[1] = "CA";
   ...

   myStates[0] = "Arizona";
   myStates[1] = "California";
   ...
%>
...
<select name="states">
  <option value="<%=myAbbrevs[0] %>"><%=myStates[0] %></option>
  <option value="<%=myAbbrevs[1] %>"><%=myStates[1] %></option>
  ...
</select>

hope that will help

s.b.

>Hi,
>    I want to use the select tag in struts to print out the list of US
>states
>along with their codes.Something like this,
>
>         <select name="states">
>         <option value="AZ">Arizona</option>
>         <option value="CA">California</option>
>         ...
>         </select>
>
>         The list of states and their codes is a two dimensional array of
>strings in
>a bean.
>         How can i do it in struts framework?
>
>TIA,
>gg
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to