<html:select property="Name" name="**Form" value="admin" >
<html:options collection="list" property="userName" labelProperty="userName"/>
</html:select>其中value是作比较的值

解决方案 »

  1.   

    <%@page import="java.util.Vector"%>
    <%
    Vector colorCollection = new Vector();
    colorCollection.add(new LabelValueBean("Pink","htemselect.pink"));
    colorCollection.add(new LabelValueBean("Brown","htemselect.Brown"));
    pageContext.setAttribute("colorCollection",colorCollection);
     %>
    <html:select property="list">
    <html:options collection="colorCollection" property="value" labelProperty="label"/>
    </html:select>
    property中value="htemselect.pink",labelProperty中label="Pink"-->显示在下拉菜单中的值!
      

  2.   

    看看这个帖子:
    http://topic.csdn.net/t/20051228/10/4485712.html
      

  3.   

    写死的这种:
    <html:select property="bank">
       <html:option value="">---请选择---</html:option>
       <html:option value="工商银行">工商银行</html:option>
       <html:option value="招商银行">招商银行</html:option>
       <html:option value="农业银行">农业银行</html:option>
       <html:option value="建设银行">建设银行</html:option>
       <html:option value="交通银行">交通银行</html:option>
       <html:option value="蒲发银行">蒲发银行</html:option>
    </html:select>动态的这种(request或seesion中有shopforms的集合才能迭代):
    <html:select property="regShop">
      <html:option value="">---请选择---</html:option>
      <logic:iterate id="sForm" name="shopForms">
        <html:option value="${sForm.shopName}">
           <bean:write name="sForm" property="shopName"/>
        </html:option>
      </logic:iterate>
    </html:select>
    当然两种都是包含在一个固定的form中一个属性(也就是成员变量)的
      

  4.   

    http://community.csdn.net/Expert/TopicView3.asp?id=4764017