This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes forEach not working Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "forEach not working" Watch "forEach not working" New topic
Author

forEach not working

Bob Dunn
Greenhorn

Joined: Jun 23, 2011
Posts: 12
I'm adding a forEach statement in the index.jsp page and it's not working. I'm using netbeans and item.product.description line is highlighted and the error/warning is "Multiple Breakpoints". I'm not sure what Multiple Breakpoints mean.





web.xml

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

It means something about the breakpoints you've configured so you can do debugging in Netbeans. It doesn't mean anything about your code at all. Did the message actually prevent you from running that code, or did you just not try when you saw the message?
Bob Dunn
Greenhorn

Joined: Jun 23, 2011
Posts: 12
When I run it I get a 500 error.

org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 20

17: <td align="left"></td>
18: </tr>
19:
20: <c:forEach var="item" items="${products.items}">
21: <tr valign="top">
22: <td>${item.product.code}</td>
23: <td>${item.product.description}</td>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:519)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
cart.ProductsServlet.processRequest(ProductsServlet.java:28)
cart.ProductsServlet.doGet(ProductsServlet.java:40)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NumberFormatException: For input string: "items"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:449)
java.lang.Integer.parseInt(Integer.java:499)
javax.el.ListELResolver.coerce(ListELResolver.java:167)

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: forEach not working
 
Similar Threads
web service integration using Netbeans IDE
Reiterating tags
Httpsesion Listener is not working properly?
HTTP Status 404 - Servlet is not available
HTTP status 500-