If I understand properly this part
var markers = [
<c:forEach var="s" items="${list.rows}">
[<c:out value="${s.latitude}"/>,<c:out value="${s.longitude}"/>]
</c:forEach>
there are only 2 fields in output array. In that case indexes used to create LatLng
are wrong and should be changed to use 0 and 1:
position: new google.maps.LatLng(markers[i][0], markers[i][1]),
Otherwise, you will have to include also information for infowindow content.