从Servlet里边读取数据到页面为什么会打印出我不需要的数据啊
Listlist=ReportDetaildaoImpl.GetReportDetailList(userid);//得8条数据for(inti=0;i<list.siz...
List list=ReportDetaildaoImpl.GetReportDetailList(userid);//得8条数据
for (int i = 0; i <list.size(); i++) {
ReportDetail rdt=(ReportDetail)list.get(i);
if(list.size()-1==i)
str+="702|TradeStore|"+pageNO+"|总页数|"+rdt.getOrderCode()+"|"+rdt.getCompanyname()+"|状态|"+rdt.getOType()+"|"
+rdt.getNum()+"|"+rdt.getPrice()+"|"+rdt.getTDate()+"|加码|"+rdt.getEndPrice()+"|涨跌|"+rdt.getTTime()+"|成交时间|下单总类|删单|浮动盈亏";
else
str+=str+="702|TradeStore|"+pageNO+"|总页数|"+rdt.getOrderCode()+"|"+rdt.getCompanyname()+"|状态|"
+rdt.getOType()+"|"+rdt.getNum()+"|"+rdt.getPrice()+"|"+rdt.getTDate()+"|加码|"+rdt.getEndPrice()+"|涨跌|"+rdt.getTTime()+"|成交时间|下单总类|删单|浮动盈亏@";
}
request.setAttribute("Reportdt", str);
RequestDispatcher rs=request.getRequestDispatcher("/ReportDatailServlet.jsp");
rs.forward(request, response);//执行这里之后jsp页面就显示无数条数据 展开
for (int i = 0; i <list.size(); i++) {
ReportDetail rdt=(ReportDetail)list.get(i);
if(list.size()-1==i)
str+="702|TradeStore|"+pageNO+"|总页数|"+rdt.getOrderCode()+"|"+rdt.getCompanyname()+"|状态|"+rdt.getOType()+"|"
+rdt.getNum()+"|"+rdt.getPrice()+"|"+rdt.getTDate()+"|加码|"+rdt.getEndPrice()+"|涨跌|"+rdt.getTTime()+"|成交时间|下单总类|删单|浮动盈亏";
else
str+=str+="702|TradeStore|"+pageNO+"|总页数|"+rdt.getOrderCode()+"|"+rdt.getCompanyname()+"|状态|"
+rdt.getOType()+"|"+rdt.getNum()+"|"+rdt.getPrice()+"|"+rdt.getTDate()+"|加码|"+rdt.getEndPrice()+"|涨跌|"+rdt.getTTime()+"|成交时间|下单总类|删单|浮动盈亏@";
}
request.setAttribute("Reportdt", str);
RequestDispatcher rs=request.getRequestDispatcher("/ReportDatailServlet.jsp");
rs.forward(request, response);//执行这里之后jsp页面就显示无数条数据 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询