我传到页面的一个对象里面有 一个String数组  String[] countries
问:
我怎么在页面上取得这个数组中的值啊?
备注:不用jstl表达式,用的标签是strut1的自带标签

解决方案 »

  1.   


    <logic:iterate id="ctr" name="${bean.countries}" indexId="index">
    ${ctr};
    </logic:iterate>是这样吗》?报错啊
      

  2.   

    报什么错啊 
    <logic:iterate id="ctr" name="${countries}" indexId="index">
    ${ctr};
    </logic:iterate>这样就行了吧
      

  3.   

    <logic:iterate id="country" name="countries"
    >
    <html:text property="country" style="width: 50px; text-align: center;" />
    </logic:iterate >
    试试
      

  4.   


    我这个countries 是在bean对象下面的一个数组。。传到页面的是bean对象能直接用name="countries"吗?
      

  5.   

    <logic:iterate id="ctr" name="countries" indexId="index">
    ${ctr};
    </logic:iterate>
    应该是这样
      

  6.   


    Caused by: javax.servlet.jsp.JspException: Cannot find bean [Ljava.lang.String;@4d594d59 in any scope
      

  7.   

    <logic:iterate id="ctr" name="bean" property="countries" indexId="index">
    ${ctr};
    </logic:iterate>
      

  8.   


    No getter method for property countries of bean BROKERSINFO但是我明明有get方法啊
      

  9.   

    你确定有getCountries()方法,注意检查哦。
      

  10.   

    你的bean 就是你说的那个bean么。。有可能页面拿到的bean并不是你想的bean..而是别的bean