Discussions

Web tier: servlets, JSP, Web frameworks: how do i set end value dynamically in c:forEach loop

  1. how do i set end value dynamically in c:forEach loop (2 messages)

    Im using Struts as frame work. On action side i set the attribute "totalSize" (by request.setAttribute method) request.setAttribute("tottalSize", catList); now on the jsp page i tried this: and tried to do an foor loop But i get error that the tottalSize is not resolved.. I want to set endValue in the action and want to read on the jsp. page. How do i do it? please help..
  2. Usually you just give forEach the collection in it's items attribute and it naturally iterates through all the members. No need to explicitly set a start and end.
  3. Don't use ''