Unknown tag (primary) warning in a JSP file in Eclipse

I have this annoying behavior with Eclipse where it warns me about an element <main>in my JSP file.

I have one <!DOCTYPE html>at the top of my page and I am using several other HTML5 elements, such as <header>and <footer>, but Eclipse does not give a warning about this.

I tried disabling HTML and JSP syntax checking, but this does not seem to work.

I just don’t understand why it has a problem with the tag <main>, but not with other HTML5 tags, and that the little yellow underline is annoying SUPER.

How can I make Eclipse ignore this tag?

Thank you in advance for your answers.

+4
source share
1 answer

So it looks like people had a similar problem with HTML5 attributes according to the question related to @safin chacko comment.

The answers posted there show how you could make Eclipse ignore validation of specified attributes. Since then, it seems that Eclipse has an additional feature that allows you to ignore the validation of certain elements.

I posted an answer to this question , which also answers my own question.

+4
source

Source: https://habr.com/ru/post/1628980/


All Articles