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.
Created attachment 136946 [details] Screenshot of the issue I've a JSP file that returns a JSON output. NetBeans insists in parsing it as HTML file, providing validation errors for it.
Created attachment 136947 [details] JSP file that produces a JSON output
I don't think this is a bug. You have 4.01 Strict DTD used (according to the tooltip text) and inside the JSP you have code (text in this case and tags from JSTL core) that is not 4.01 Strict compliant. I think case with JSTL core tags is covered in issue 232439. It is like having PHP code in Java file, you cannot blame editor for marking PHP code as error as well. You can either change doctype to more benevolent HTML5 (does not help completely), or disable HTML validation.
(In reply to comment #2) > I don't think this is a bug. You have 4.01 Strict DTD used (according to the > tooltip text) and inside the JSP you have code (text in this case and tags from > JSTL core) that is not 4.01 Strict compliant. I think case with JSTL core tags > is covered in issue 232439. It is like having PHP code in Java file, you cannot > blame editor for marking PHP code as error as well. > > > You can either change doctype to more benevolent HTML5 (does not help > completely), or disable HTML validation. Page Content type is set to "application/json". Is anything else I'm missing? I don't want this page to be html at all, neither 5, or 4, or 3...
If you click on the bulb icon at line 21 on your screenshot, you can disable HTML checking for this file/project. I believe the contentType is used by editor only for possible encoding (if pageEncoding is not used)