为了账号安全,请及时绑定邮箱和手机立即绑定

请问下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++)


正在回答

1 回答

应该是空指针异常吧,你新建了这个itemsDao对象,就直接去get元素。。。

2 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

请问下arraylist问题如何解决

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号