直接用老師給的代碼執(zhí)行,cookie那老是有錯(cuò)誤
org.apache.jasper.JasperException: An exception occurred processing [/details.jsp] at line [106]
103: ? ? ? ? ? ? ? ? ? }
104: ? ? ? ? ? ? ? }
105: ? ? ? ? ? ? ? Cookie cookie = new Cookie("ListViewCookie",list);
106: ? ? ? ? ? ? ? response.addCookie(cookie);
107: ? ? ? ? ?
108: ? ? ? ? ? %>
109: ? ? ? ? ? <!-- 嫻忚榪囩殑鍟嗗搧 -->
? ? ? ? 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>
? ? ? ? ? ? ?<!-- 循環(huán)開始 -->
? ? ? ? ? ? ?<%?
? ? ? ? ? ? ? ? ArrayList<Items> itemlist = itemDao.getViewList(list);
? ? ? ? ? ? ? ? if(itemlist!=null&&itemlist.size()>0 )
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ?System.out.println("itemlist.size="+itemlist.size());
? ? ? ? ? ? ? ? ? ?for(Items i:itemlist)
? ? ? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ?%>
2019-11-30
Itemdao里的改成
detail.jsp的改成
2019-04-26
請(qǐng)問這解決了嗎,我也是這樣
2018-08-01
請(qǐng)問你解決了嗎,我也出現(xiàn)了這個(gè)問題
2018-06-06
你把 itemsdao類里面的,也換成#就行了
2018-03-11
cookie拼接問題,不能用,拼接,試試用#號(hào)連接id
list+=request.getParameter("id")+"#";
? ? String[] arr=list.split("#");