Hi,
I have been trying to loop through a targetData variable using JSP.
In my workflow I have got 6 images. All of them are stored as below:
targetData.image1
targetData.image2
targetData.image3
targetData.image4
targetData.image5
targetData.image6
Instead of printing them separately, I want to run a loop and print it.
<% for(int i=0; i<6; i++) { %>
<img src="<%= targetData.image[i] %>" />
<% } %>
I also tried
<% for(int i=0; i<6; i++) { %>
<img src="<%= targetData.image.concat('i') %>" />
<% } %>
Nothing seems to work. Kindly help me with a solution.