Error 500 Cannot Create Iterator For This Collection
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error of iterator in mys JSP up vote 1 down vote favorite
TITLLE |
---|
[...] |
[...] |
Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in JavaServer Faces All PlacesJavaJava EE (Java Enterprise Edition)JavaServer Faces This discussion is archived 1 Reply Latest reply on Jun 19, 2004 3:12 PM by 843842 Cannot http://stackoverflow.com/questions/2491084/error-of-iterator-in-mys-jsp create iterator for this collection...ArrayList() 843842 Jun 19, 2004 2:41 PM Help please! Process flow ============ Index.jsp is supposed to execute the getCustomer() method in customerAction class. The customerAction is supposed to put a customers ArrayList object in the request scope. the customer.jsp screen is supposed to iterate through the customer https://community.oracle.com/thread/1742448 ArrayList object that was placed in the request scope and display the data in their respective fields. My objective is to display the data brought back from the database. When I debugged CustomerAction class with these lines of code: Iterator i = customers.iterator(); while( i.hasNext() ){ System.out.println( "((CustomerBean)i.next()).getFirstName(): " + ((CustomerBean)i.next()).getFirstName() ); } , I got the following out from the Arraylist object that is placed the the request scope: ((CustomerBean)i.next()).getFirstName(): OLA ((CustomerBean)i.next()).getFirstName(): OLATEST ((CustomerBean)i.next()).getFirstName(): SAUD Please tell me the cause of the error and how to work round it. In any case, is there a more efficient way of achieving my objective? Thanks. Ola Oke Error ===== When I execute/run index.jsp screen I get the error below: org.apache.jasper.JasperException: Cannot create iterator for this collection at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) ... JSP FILES: ========== index.jsp (This is the
question is common, but I´m still struggling http://grokbase.com/t/struts/user/01335vkg0t/iterate-tag-error-cannot-create-iterator-for-this-collection with the iteratetag.Please can somebody help me?When I´m using the logic:iterate tag I get only the following error:"javax.servlet.ServletException: Cannot create iterator for this collection"The not working code is: