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.
Product Version = NetBeans IDE Dev (Build 201307072319) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.7.0_21 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01 NetBeans is alerting abou invalid characters inside a sql:query. Seems that the validator is not considering that it should ignore expressions inside JSTL (actually, HTML parser/validator it should ignore JSTL declarations at all).
Created attachment 136868 [details] Screenshot of the issue.
Created attachment 136908 [details] Additional example
Could you please attach also the JSP file? I tried following: <sql:query var="postWarBabies" dataSource="bar"> SELECT a.b FROM a WHERE cv.status='1' and cv.publicar='Y' AND (a.c <> '' or a.d <> '') AND cv.tipo_vaga in ('1', '2') AND a a.b >= 1 and test.remove(TI.no_item) like '%' || test.remove(?) like '%' group by 1,2 order by 1,2 <sql:param value="${firstName}"/> </sql:query> And it shows error about sql:param only, which I think is a bug. Thank you in advance. Product Version: NetBeans IDE Dev (Build 201307100049) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Created attachment 136933 [details] This is a example of the problem - this page is a fragment that is included in a more complex page
This page is used in a <jsp:include ...> from inside a more complex page and/or through jQuery.load() (doesn't matter, depends in using AJAX or not).
Created attachment 136934 [details] screenshot without any errors Could you please try it in newer build? As you can see on this screenshot, there are no errors (red underline is spellchecker). Thank you Product Version: NetBeans IDE Dev (Build 201307100049) Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Created attachment 136941 [details] Better - more complex - example
(In reply to comment #6) > Created attachment 136934 [details] > screenshot without any errors > > Could you please try it in newer build? As you can see on this screenshot, > there are no errors (red underline is spellchecker). Thank you > > > Product Version: NetBeans IDE Dev (Build 201307100049) > Java: 1.7.0_25; Java HotSpot(TM) Client VM 23.25-b01 > Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 > System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb) For sure, just updated to DEV201307102300. Problem still exists with more complex queries.
Created attachment 136942 [details] Screenshot of the error in the more complex example
(In reply to comment #9) > Created attachment 136942 [details] > Screenshot of the error in the more complex example This screenshot is from DEV201307102300.
Thanks a lot, the screenshot actually helped. The difference is I have HTML5 doctype, while you are using 4.01 Strict and it doesn't like unescaped < >. So it is reproducible with this doctype. Thanks for samples.
I do not remember details of "4.01 Strict" validation but this sounds like a user's errror - either encode <> or user different DOCTYPE? Would you agree reporter? Closing as wontfix for now but please feel free to reopen if you disagree. Thx.
Hi, thanks for your answer. The point IMHO doesn't matter which HTML parser I choose, the SQL code inside <sql:query></sql:query> must not be evaluated. If I encode the SQL code (which is the wrong action, as far as I know), I will get an error at Runtime (syntax error in SQL query). Regards, Edson
I'm sorry, you are right. HTML Validator should not validate content of <sql:query> tag. A short term workaround would be to switch HTML Validator to less strict version for your JSP files (there is a light bulb on the first line offering that).
Works fine for me. The html validation is disabled for all templating languages by default. Reporter, can you please confirm? Create a new project/new jsp and put your code into - there should be no html errors until you explicitly enable the checking by the hint fix on the very first line.