日期:2014-05-17  浏览次数:20792 次

<s:iterator>使用request输出不了

public class ReserveCheck extends ActionSupport {
   public String execute() throws Exception{
   ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
   IUserDao userDao=(IUserDao)ctx.getBean("userDAO");
   ActionContext loginCtx= ActionContext.getContext();
   Map request=(Map)ActionContext.getContext().get("request");
   List log=userDao.findAllReserve();
       System.out.println(log.size());
       request.put("log", log);
   return SUCCESS;
   }
}

action使用的类,输出log.size()显示里面有三条记录,但在JSP页面就输出不了。。


<s:iterator value="#request.log" id="log">
          <tr>
            <td>
              <s:property value="#log.name"/>
            </td>
             <td>
              <s:property value="#log.gender"/>
            </td>
             <td>
              <s:property value="#log.telphone"/>
            </td>
             <td>
              <s:property value="#log.email"/>
            </td>
             <td>
              <s:property value="#log.intentionbuytime"/>
            </td>
            <td>
              <s:property value="#log.intentioncar"/>
            </td>
          </tr>
        </s:iterator>

这边是<s:iterator>标签里的内容
<s:iterator> request SSH Struts