Bug 202573 - [validation] There should be a way to suppress JSP validator warnings
Summary: [validation] There should be a way to suppress JSP validator warnings
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Linux
: P4 enhancement (vote)
Target Milestone: 3.1   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-09-07 02:49 EDT by Max Gilead CLA
Modified: 2010-02-22 16:39 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Gilead CLA 2007-09-07 02:49:48 EDT
I believe there should be a way to suppress JSP validator warnings. Sometimes user has to use non-standard HTML elements like 'autocomplete' attribute in <input type="text" autocomplete="off" .../> tag. Even if autocomplete is a non-standard element it IS honored by browsers and it's necessary to use it in certain projects.

I suggest to add a suppress warnings feature in JSP validator, ideally much like Java's @SuppressWarnings annotation, eg. user would put <%-- SuppressWarnings: UndefinedAttribute --%> in JSP page just before invalid tag.
Comment 1 Max Gilead CLA 2007-09-07 02:52:53 EDT
Sorry, it's JSP not JSF-related.
Comment 2 Nitin Dahyabhai CLA 2007-09-07 07:02:50 EDT
Such a syntax isn't part of any standard that I'm aware of.  Have you tried disabling the JSP Content Validator?
Comment 3 Max Gilead CLA 2007-09-07 08:15:03 EDT
Sorry for the tags, they appear to work with JSP but I'm not an expert here so I won't argue over it :) Let's just assume they meant 'some kind of comment tag' :)

I haven't tried disabling JSP validator since it's very useful tool and I do need it for the rest of the project. Form with autocomplete attribute is just one problematic spot which means without warning suppression I'll always have at least a few warnings in Problems tab, even with perfectly clean project.
Comment 4 Amy Wu CLA 2007-09-14 11:36:49 EDT
You could always filter it out of your Problems view.
Comment 5 Amy Wu CLA 2007-09-14 11:42:03 EDT
Oh, and I should point out that there is a difference between JSP Syntax Validator & JSP Content Validator.  JSP Syntax Validator validates things like el & java code in jsps and jsp action tags and taglib directives.  JSP Content Validator validates the html in the JSP, like unknown attributes in tags which is the one you are concerned about.  I'm not sure which one you find useful (hopefully both) but if you're mainly concerned about JSP Syntax Validation, then it is possible for you to just turn off JSP Content Validation then.
Comment 6 Max Gilead CLA 2007-09-14 13:56:29 EDT
Well, I believe that code with invalid syntax wouldn't simply run, isn't that true? What bothers me are non-standard attributes that has to be used inside project. As I said, turning validation off completely is not an option since it's extremely useful feature.
Comment 7 Nitin Dahyabhai CLA 2007-09-20 05:24:23 EDT
Invalid attributes on custom tags would prevent a page from running, but not on the HTML around them.  I'm setting it to 3.0, _time permitting_, but high quality contributions would be helpful.
Comment 8 Nitin Dahyabhai CLA 2008-04-17 14:03:46 EDT
Amy, fixed via JSP Validation preference page?
Comment 9 Amy Wu CLA 2008-10-27 04:16:54 EDT
reassigning to inbox
Comment 10 Nitin Dahyabhai CLA 2010-02-22 16:39:37 EST
Fixed via HTML Validation preference page