I have been learning JSP and Servlets when I came upon JSTL and EL concepts.. I am new to JSP...
From what I understand JSTL and EL was introduced in JSP so as to avoid using scriplets
Expand|Select|Wrap|Line Numbers
- <%%>
But the prefix:forEach loop has me confused...I have tried using it to display arrays,lists,string,arraylists,vectors,etc... for practice and noticed that I have to use
Expand|Select|Wrap|Line Numbers
- <prefix:forEach>//Display here//${data}</prefix:forEach>
So if I have 10 different arraylists..I will have to use 10 forEach loops...It kind of makes the page too long and lot of efforts...If I use scriplets
Expand|Select|Wrap|Line Numbers
- <%%>
Expand|Select|Wrap|Line Numbers
- name.get(variable of for loop);
Or is there a way to make prefix:forEach to behave like a normal for loop and get all 10 arraylists's data using single forEach??