This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Overview: Within the <script> block of a JSP file, if there are any JavaScript variable declaration added after "%>", the JSP is marked with a red error badge. On mouse-over the file name the tooltip shows "Error parsing file". Steps to reproduce: 1. Create a new JSP file within a project. 2. Add a <script> block. 3. Within the <script> block add a scriptlet with: <% if (true) { %>var i = 0; alert(i); <% } %> 4. Save the file. 5. Notice the red error badge on the file. Sometimes the editor window will also display a warning annotation on the "var" line. Workaround: Move "var" declaration to a new line (i.e. press ENTER after %>) and the parse error goes away upon save. I discovered this issue and workaround when reformatting a few JSP files but it may not be feasible to do so on a large web project (large number of JSP files). Expected result: There should not be any parsing error as it is not necessary to have a new line after %>.
Works fine in trunk, no error badge. Maybe fixed by issue 225738 or issue 225442? Product Version: NetBeans IDE Dev (Build 201303102300) Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03 System: Linux version 3.2.0-38-generic-pae running on i386; UTF-8; en_US (nb)
Vlada is right, this issue is related to the issue #225442. Will be fixed in the patch1 of the NetBeans 7.3. *** This bug has been marked as a duplicate of bug 225442 ***