java新人求助C:forEach和C;if

function showJlInspectionLocalCheckPerson(){
var dotable2 = document.getElementById('tab11');

var nodes2 = dotable2.lastChild.getElementsByTagName("input");
for( i=0;i<nodes2.length;i++){
if(nodes2[i].name=="inspectionLocalCheckPersonId"){
nodes2[i].value = "${q.userId}";
}

if(nodes2[i].name=="inspectionLocalCheckPerson"){
nodes2[i].value = "${q.userName==null?q.userName:q.userName}";
}
if(nodes2[i].name=="localCheckPersonId"){
nodes2[i].value = "${q.localCheckPersonId==null?q.userName:q.localCheckPersonId}";
}

        }
        dotable2.appendChild(dotable2.lastChild.cloneNode(true));
        nodes2 = dotable2.lastChild.getElementsByTagName("input"); 
        for(i=0;i<nodes2.length;i++){ 
            nodes2[i].value = "";    
        }
    </c:forEach>//出错:Syntax error on token(s), misplaced construct(s)
    <c:if test="${fn:length(jlInspectionLocalCheckPersonList)>1}">//出错:Syntax error on token "if", delete this token
    dotable2.removeChild(dotable2.lastChild);
    </c:if>

http://ask.csdn.net/questions/70431