html:img又没有问题,你写的strGraphurl对象的引用本来就是graphurl啊

解决方案 »

  1.   

    String strGraphurl= new String("graphurl["+i+"]");
          //LINECHARTFORMBEAN 里定义过了,private String[] filename= new String[20];
          String strFilename= new String("filename["+i+"]");
    你这里得出来得当然是graphurl[0],filename[0]
    String strGraphurl= new String(graphurl[i]);
    String strFilename= new String(filename[i]);
      

  2.   

    <html:img page="<%=graphurl[i]%>" usemap="#<%=filename[i]%>" width="300" height="200" border="0"/>
      

  3.   

    这里是struts,actionform和formbean自动关联能取到formbean里相应字段的值,用strGraphurl是为了循环来做。照道理来说,应该是能得到formbean里的东西。
    这个使我以前的代码,都是对的。
     <%            
        for(int i=0;i<10;i++){  
            String strKenmeyi= new String("kenmeyi["+i+"]");
            String strNyuusatuno= new String("nyuusatuno["+i+"]");     
      %>
    <html:text property="<%=strKenmeyi%>" styleClass="inputhidenlf" size="45" readonly="true"/>
    这些都可以正确解析出formbean里由bussiness层塞进去的东西的值
    如<%=strKenmeyi%>并不是kenmeyi[0]等,而是在formbean里数组kenmeyi第一项的值