ArrayList a = new ArrayList();
ResultSet rs = ps.executeQuery();
Iterator it = rs.iterator();
while (it.hasNext())
{
    a.add(it.next())
}你的al.get是根据索引得到Object你这错误太多了...你找个完整的例子看下吧 

解决方案 »

  1.   

    An error occurred at line: 78 in the jsp file: /Get.jsp 
    The method get(int) in the type ArrayList is not applicable for the arguments (String) 
    ArrayList 的get方法参数是 int 不是 String
      

  2.   

    把ResultSet的结果封装到包含javaBean 对象的ArrayList中,在jsp页面用El表达式取值。或者把ResultSet的値封装到Hashtable中,在页面通过键值队取值。这都可以在jsp页面取到値,不会报错的