Community
Participate
Working Groups
If you use <%-- --%> as a JSP code comment to avoid evaluation, this is not recognized. It is treated as a normal <% %>.
Can you be more specific? Where is it being treated as a normal scriptlet?
I'm sorry, I though this was I general problem. I back checked on that. Seems like it has something to do with dots and spaces somewhere in the comment. I have attached you some file, which shows the problem!
Created attachment 22388 [details] A jsp with the comment problem! Where did the attachment go the first time I tried?
I think you also attached same file to bug 95091 ... I assume that one was an error attachement? (I think you can mark an attachment 'deleted', or something, if invalid).
The comment on line 199 is interpreted as a scriptlet--we don't support a comment in there just yet, only expressions and scriptlets. What you're seeing is your comment being parsed and highlighted as a scriptlet.
Hi. Any progress on this bug? I have a tester on my team that has been hitting it for several months and is wondering if/when this is going to be fixed.
Nitin, I assume this would take a major fix to parser to fix correctly? Phil, can you think of any "context" you could take advantage of to at least not flag this as an error? (for 101 stream) (e.g. if a is embedded in an embedded region in an embedded region in a custom tag's attribute ... or something?)
The fact that the JSP parser in WTP is not spec compliant is getting harder and harder to explain, and I've heard several reports of this. Raising as a hot bug request for IBM for WTP 1.5.
I agree this this is a hot bug. I'm still not sure we can safely fix it for 1.5, but it does deserve some focused investigation to map out alternatives.
*** Bug 140533 has been marked as a duplicate of this bug. ***
Created attachment 40895 [details] proposed (workspace) patch Attaching a patch to modify the JSPTokenizer and unit tests. The only visible change in behavior is that JSP comments in XML tags are parsed as embedded region containers of type JSP_COMMENT_TEXT. The change consists mostly of a new grammar rules and corresponding JFlex action. It allows for the comments to show up anywhere just like JSP Expressions, and starts with the same expression handling JFlex action code, but alters its copy so that it doesn't transition to the next state while returning a comment embedded region. The comment is special in that it's not supposed to take the place of an attribute name, value, etc., that's why it's not an exact duplicate of the expression-handling JFlex action. It doesn't touch any of the custom buffer/array handling code, which is what would have made this an especially risky fix. The patch also introduced a new unit test for this case specifically and additional test for some edge cases. _Existing tests were not functionally modified since this was previously untested behavior and is not allowed to break existing tests._
Looks good Nitin. Approved.
Committing to HEAD and releasing for RC3.
Thx for fixing! Looking forward to the new release :)!
This is part of a mass update to close out all stale WTP defects already verified by the reporter but awaiting closure by the assignee. If you feel this defect was closed inappropriately, please reopen. Thanks, John Lanuti