How to loop over something a specified number of times in JSTL?

The <c:forEach> tag is definitely suitable for this. It has begin and end attributes where you can specify the, well, begin and end. It has a varStatus attribute which puts a LoopTagStatus object in the loop tag scope which in turn has several methods like getIndex() and on. Here’s a kickoff example:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)