这是Action--
private MeanTable mt;
private IMeanTableBiz mb;
private PageBean Pagebean;
private List<MeanTable> list;get.set方法都有的。
public String test() {
HttpServletRequest request = ServletActionContext.getRequest();
String creteDate1=request.getParameter(("creteDate1"));
String creteDate2=request.getParameter(("creteDate2"));
list=this.mb.queryAll(mt, Pagebean, creteDate1, creteDate2);

System.out.println(list);

return "regFailed";

--list.size()是有数据的
}--xml
<package name="sapreport" extends="struts-default" namespace="/sapreport">
<action name="sapReportAction" class="sapReportAction">
<result name="regFailed">/MyJsp.jsp</result>
</action>
</package>
--页面
<s:iterator value="list" id="s">
<tr class="odd">
<td nowrap align="center" ><s:property value="#s.id"/></td>
<td nowrap align="center" ><s:property value="#s.interfaceID"/>  </td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td nowrap align="center" ></td>
<td align="center">&nbsp;</td>
<td nowrap align="center"  ></td>
<td nowrap> 
</td>
</tr>
</s:iterator>
是当前页提交然后再回到当前页 :sshiteratoraction

解决方案 »

  1.   

        <s:iterator value="page" id="list">
           <s:iterator value="list">
    <s:property value="genreId"/>
           </s:iterator>
         </s:iterator>
      

  2.   

    action中对这个list生成get方法就可以了
      

  3.   

    有get set方法 问题是 没有数据。。
      

  4.   

    用了,spring没有,在application有没有配BO?
      

  5.   

    <!-- sapreport模块 -->
    <bean id="iMeanTableBiz" class="com.dare.sapreport.biz.impl.MeanTableBizImpl" parent="baseBiz">
    </bean>

    <bean id="sapReportAction" class="com.dare.sapreport.web.SapReportAction" scope="prototype">
    <property name="mb">
    <ref local="iMeanTableBiz" />
    </property>
    </bean>
    </beans>
      

  6.   

    你action里的mt属性好像没注入啊
      

  7.   

    你用${list.id},${list.interfaceID}代替下面的试试
    <td nowrap align="center" ><s:property value="#s.id"/></td>
    <td nowrap align="center" ><s:property value="#s.interfaceID"/>  </td>
      

  8.   

    [qote=引用 9 楼 a092cc 的回复:]
    你用${list.id},${list.interfaceID}代替下面的试试
    <td nowrap align="center" ><s:property value="#s.id"/></td>
    <td nowrap align="center" ><s:property value="#s.interfaceID"/>  </td>
    <td nowrap align="center" >${list.id}</td>报错
      

  9.   

    你用<s:debug/>标签看下数据回来了吗
      

  10.   

    首先看下~~~控制台中action是否获取到了数据~~如果有那就是前台页面的问题~~如果么有就是后台的问题~~~前台的话~~~一般~~不外乎~~标签有没有用对~~~对象名~~~引用了没之类的,后台的话~~就是注入的问题一般~~~~