亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

哪里有問題呢?老是報錯?

哪里有問題呢?老是報錯?

憂傷的民工 2018-05-26 01:31:34
?<%?? ? ? ? ? ? ? String list ="";? ? ? ? ? ? ? //從客戶端獲得Cookies集合? ? ? ? ? ? ? Cookie[] cookies = request.getCookies();? ? ? ? ? ? ? //遍歷這個Cookies集合? ? ? ? ? ? ? if(cookies!=null&&cookies.length>0)? ? ? ? ? ? ? { ? ? ? ? ? ? ?for(Cookie c:cookies) ? ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? ?if(c.getName().equals("ListViewCookie")) ? ? ? ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? ? ? list = c.getValue(); ? ? ? ? ? ? ? ? ?} ? ? ? ? ? ? ?} ? ? ? ? ?}? ? ? ? ? ? ??? ? ? ? ? ? ? list+=request.getParameter("id")+",";? ? ? ? ? ? ? //如果瀏覽記錄超過1000條,清零.? ? ? ? ? ? ? String[] arr = list.split(",");? ? ? ? ? ? ? if(arr!=null&&arr.length>0)? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? if(arr.length>=1000)? ? ? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? ? ? list="";? ? ? ? ? ? ? ? ? }? ? ? ? ? ? ? }? ? ? ? ? ? ? Cookie cookie = new Cookie("ListViewCookie",list);? ? ? ? ? ? ? response.addCookie(cookie);? ? ? ? ??? ? ? ? ? %>? ? ? ? ? <!-- 瀏覽過的商品 -->? ? ? ? ? <td width="30%" bgcolor="#EEE" align="center">? ? ? ? ? ? ?<br>? ? ? ? ? ? ?<b>您瀏覽過的商品</b><br>? ? ? ? ? ? ?<!-- 循環開始 -->? ? ? ? ? ? ?<%?? ? ? ? ? ? ? ? ArrayList<Items> itemlist = itemDao.getViewList(list);? ? ? ? ? ? ? ? if(itemlist!=null&&itemlist.size()>0 )? ? ? ? ? ? ? ? {? ? ? ? ? ? ? ? ? ?System.out.println("itemlist.size="+itemlist.size());? ? ? ? ? ? ? ? ? ?for(Items i:itemlist)? ? ? ? ? ? ? ? ? ?{? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ?%>? ? ? ? ? ? ?<div>? ? ? ? ? ? ?<dl>? ? ? ? ? ? ? ?<dt>? ? ? ? ? ? ? ? ?<a href="details.jsp?id=<%=i.getId()%>"><img src="images/<%=i.getPicture() %>" width="120" height="90" border="1"/></a>? ? ? ? ? ? ? ?</dt>? ? ? ? ? ? ? ?<dd class="dd_name"><%=i.getName() %></dd>?? ? ? ? ? ? ? ?<dd class="dd_city">產地:<%=i.getCity() %>&nbsp;&nbsp;價格:<%=i.getPrice() %> ¥ </dd>?? ? ? ? ? ? ?</dl>? ? ? ? ? ? ?</div>? ? ? ? ? ? ?<%?? ? ? ? ? ? ? ? ? ?}? ? ? ? ? ? ? ? }? ? ? ? ? ? ?%>? ? ? ? ? ? ?<!-- 循環結束 -->? ? ? ? ? </td>? ? ? ? </tr>? ? ? </table>? ? </center>報錯截圖
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1024 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號