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.
I have the following code snippet from a JSP that I am working on: var MAX_RECORDS = <bean:write name="maxRecords"/>; This produces a "SYNTAX ERROR" with no other explaination. I believe this to be that the JS parser does not handle setting a variable to a value that is generated from a STRUTS TAG that is not surrounded by quotes. I need this value to be numeric, not a string. I can surround this with an eval() statement and the error goes away, I just don't think that it should be required since the JSP gets compiled just fine and the source is correct without errors in the page.
Once this "syntax error" appears it travels to last edited line (on save).
Another example, this time using JSTL: function passAll() { for( i = 0; i < <c:out value='${resultSize}'/>; i++ ) { document.getElementById( 'hasSucceeded_' + i ).selectedIndex = 1; } } Syntax errors galore!
I tried the last example and I can see errors - but these errors are JavaScript errors, no JSP parser error. Please evaluate, thanks. (I hope I selected the correct component.) Product Version: NetBeans IDE Dev (Build 080610) Java: 1.5.0_15; Java HotSpot(TM) Client VM 1.5.0_15-b04 System: Linux version 2.6.25-gentoo-r4 running on i386; UTF-8; cs_CZ (nb)
Both of these code snippets appear to work now. I just fixed two other bugs in the same area (JavaScript embedding in JSP) - issue 133173 and issue 133469. It's possible that this bug was fixed by one of those two bug fixes. If you can reproduce the issue, please attach a code sample.
No errors anywhere. Product Version: NetBeans IDE Dev (Build 080905) Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-b02 System: Linux version 2.6.26-gentoo-r1 running on i386; UTF-8; cs_CZ (nb)
verified. NetBeans IDE Dev (Build 20080911010625)