Whether variables i,j are not visible to EL? if so why?
That's right. Scripting variables and EL scoped variables are different. You cannot use scripting variables in EL, unless you explicitly set them in a scope. If you had <c:set var="i" value="1"/>, it would be ok, as it would set a page scope variable called "i" whose value is "1". (same for j)