<html:select property="" styleClass="txtFill_1Line">
                <option value="01"><bean:message /></option>
</html:select>

解决方案 »

  1.   

    property需要用file文件流来读取和操作。读取的内容放到List,其他的与一般的一样。
      

  2.   

    <options>提供了一组HTML的<option>元素,而每个<option>元素所对应的值由其collection属性来指定,并且这个属性所对应的集合应该存放在page范围内。
    1.<%
    2.      java.util.Vector ageCollection = new java.util.Vector();
    3.      ageCollection.add( new org.apache.struts.util.LabelValueBean("60-70", "d"));
    4.      ageCollection.add( new org.apache.struts.util.LabelValueBean("70-80", "e"));
    5.      pageContext.setAttribute("ageCollection", ageCollection);
    6.%>
    7.年龄: 
    8.<html:select property="age">
    9.  <html:option value="a">0-19</html:option>
    10.  <html:option value="b">20-49</html:option>
    11.  <html:option value="c">50-60</html:option>
    12.  <html:options collection="ageCollection"  property="value" labelProperty="label" /> 
    13.</html:select>注意看行5和行12你就明白了!