Loop through Array in JSP
Hi Guys,
Please Help, I had the same post before, but no one replied. please:
I've got a big problem with these JSP/JSPX pages. I'm sure you people can help me.
Basically I am passing an array of strings from a Java servlet to a JSP page where I am trying to go through the array using 'forEach' loop and for each element, invoke a MYSQL command.
The array is called "Websites".
Here is my code:
<c:forEach var="e" begin="0" step="1" end=${Websites.length}>
<sql:query var="table">
select SUM(usability) as number from ${Websites[e]};
</sql:query>
.......
I have two main problems, firstly in the ForEach Tag, "Website.length" is not working, it returns SQL error at run time.
secondly in the MySql command, "${Website[e]}" is not working too, it returns SQL error at run time as well.
PLease Please help because I have been spending so much time on this. :(:(:(