We have a page which, after loading, makes an AJAX call to retrieve some more data which is iterated over in a forEach loop, i.e. the
jsp downloaded by the ajax call contains a <c:forEach> tag. Before the page is rendered, the collection is cleared and recreated from the database. The collection referenced by the loop is supposed to be synchronized, but we have seen instances of ConcurrentModificationExceptions when the user repeatedly clicks the link to refresh the page. In the javadocs for Collections, it states that if you get a synchronized set, you need to put a synchronized block around any loops in
java so that the list will be undisturbed while you iterate over it. Can this be done in JSTL/EL?
Thanks,
Rob