struts2

 public String oddsearch()throws Exception{
  HttpServletRequest request=ServletActionContext.getRequest();
  HttpSession session=request.getSession();
  this.maxnum=dao.count(keyword);
  this.maxpage=(maxnum+linesize-1)/linesize;
  session.setAttribute("linesize", linesize);
  session.setAttribute("currentpage", currentpage);
  session.setAttribute("maxnum",maxnum);
  session.setAttribute("maxpage", maxpage);
  List<OddBean> bean = dao.serch(linesize,currentpage,keyword);
  session.setAttribute("list", bean);

  return "success";
 }

 

 

<s:iterator id="bean" value="#attr.list">
      <tr>
       <td>
    <s:property value="#bean.o_number"></s:property></td>
       <td><s:property value="#bean.o_name"></s:property></td>
       <td><s:property value="#bean.o_address"></s:property></td>
       <td><s:property value="#bean.o_named"></s:property></td>
       <td><s:property value="#bean.o_addressed"></s:property></td>
       <td><s:property value="#bean.o_shouyi"></s:property></td>
       <td><s:property value="#bean.o_shouyiadd"></s:property></td>
       <td><s:property value="#bean.attr_2"></s:property></td>
       <td><s:property value="#bean.attr_1"></s:property></td>
       <td><s:property value="#bean.o_something"></s:property></td>
       <td><s:property value="#bean.o_someprice"></s:property></td>
       <td><s:property value="#bean.o_money"></s:property></td>
       <td><s:property value="#bean.o_company"></s:property></td>
       <td><s:property value="#bean.o_username"></s:property></td>
       <td>
        <a target="_blank" href="oddload.action?e_id=<s:property value="#bean.o_number"></s:property>">修改</a>
        <a target="_blank" href="odddelete.action?e_id=<s:property value="#bean.o_number"></s:property>" onclick="return confirm('您确定要删除此信息?')">删除</a>
       </td>
      </tr>
     </s:iterator>
<tr>

你可能感兴趣的:(bean,exception,session,struts,String,iterator)