Community
Participate
Working Groups
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <head> <script type="text/javascript"> function initArray(n) { this.length = n; for (var i =1; i <= n; i++) { this[i] = ' '; } } text = new initArray(4); <c:forTokens var="token" items="${requestScope.credits}" delims="," varStatus="status"> <c:set var="pos" value="${fn:substringBefore((status.index/15), '.')}" /> <c:choose> <c:when test="${status.index%15 eq 0}"> text[<c:out value="${pos}" />]="<c:out value="${token}" />, "; </c:when> <c:otherwise> text[<c:out value="${pos}" />]=text[<c:out value="${pos}" />] + "<c:out value="${token}" />, " </c:otherwise> </c:choose> </c:forTokens> </script> </head> <body></body> </html> Red sea of error : syntax error on token(s), misplaced construct(s) Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 1 Build id: 20121004-1855 JavaScript Development Tools Version: 1.4.1.v201208171701-7H7DFg0FC7sReqSyfqesWi Build id: 20120820000423 Eclipse reports no updates when I run Help > Update check Reproducible: Always Steps to Reproduce: 1. Create Web Project. 2. Create JSP and paste the code above Expected: Jsp compiles and runs fine - not the best style but far from syntax error Related : https://bugs.eclipse.org/bugs/show_bug.cgi?id=362891