Community
Participate
Working Groups
Build Identifier: 20110916-0149 Sometimes when using JSP with EL expressions and valid inline JavaScript, JavaScript validator produces false validation error: Syntax error, insert "}" to complete Block. Reproducible: Always Steps to Reproduce: 1. Create JSP with following content: <%@page contentType="text/html; charset=UTF-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <input type="button" value="Print" onclick="ShortCardView.printByPid(${card.pid});" /> <c:choose> <c:when test="${param.dontwait==null}"> </c:when> <c:otherwise> <script type="text/javascript">window.onload=function(){window.print();window.close();};</script> </c:otherwise> </c:choose> 2. Validate file. There should be no errors but JavaScript validator shows error on the line 8 at semicolon before "</script>". Error disappears if I remove the 3rd line ("<input />" tag with EL expression). I've installed also the latest maintenance build of WTP (wtp-M-3.3.2-20111117045640.zip) which fixes other annoying JSP+EL bugs - it did not help.
Created attachment 207723 [details] JSP example
Hi Victor, I tried to recreate this bug with the latest driver (JSDT Version: 1.5.1.v201307161720-7H7FFhVFC7sResSxfpflai) and I can't see the problem. If this is still a problem, could you provide current instructions to recreate it? Otherwise, I'll recommend Chris Jaun to close this as fixed. Thanks.