我用的是setAttribute和getAttribute!
servlet:
request.setAttribute("restaurant_info",restaurant_info);
response.sendRedirect("../index.jsp");
Jsp:
List restaurant_info=(List)request.getAttribute("restaurant_info");
restaurant_info在servlet中系统输出的结果算是:
[好味道茶餐廳, 凍奶茶, 小泉居, 咖喱雞, 紅樹林, 燒味, 麥當勞, 漢堡包, 小熊貓, 吉列豬扒, 全球居, 咖喱雞, 食通天, 葡國雞]
但是在jsp就是null!
console也没有报错!哪里出错了?