請問下arraylist問題如何解決
HTTP Status 500 – Internal Server Error
Type Exception Report
Message An exception occurred processing [/index.jsp] at line [23]
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException:?An?exception?occurred?processing?[/index.jsp]?at?line?[23] 20:???????????<!--?鍟嗗搧寰幆寮?濮??--> 21:????????????<%? 22:????????????????ItemsDao?itemsDao?=?new?ItemsDao();? 23:????????????????ArrayList<Items>?list?=?itemsDao.getAllItems(); 24:????????????????if(list!=null&&list.size()>0) 25:????????????????{ 26:? ???????????????for(int?i=0;i<list.size();i++)
2018-10-16
應(yīng)該是空指針異常吧,你新建了這個itemsDao對象,就直接去get元素。。。