javahtmleclipseweb-applicationswarnings

Disable HTML Warnings in Eclipse for Java EE developers edition


I am working on a Web App with Eclipse for Java EE. I have JSP files that are built with HTML files as includes. My index.jsp looks like this:

<jsp:include page="include/top.html" />
    <title>Title!</title>
<jsp:include page="include/header.html" />
<jsp:include page="include/menu.html" />
      <div class="span-15 prepend-1 last">
        <h6>What is an <a href="http://en.wikipedia.org/wiki/Application_programming_interface">API</a>?</h6>
        <p>An application programming interface (API) is an interface that software programs implement in order to allow other software to interact with it; much in the same way that software might implement a User interface in order to allow humans to interact with it.</p>
      </div>
<jsp:include page="include/footer.html" />

The problem is with the includes. footer.html Looks like this:

      <hr />
      <h3 class="alt"><b><a href="/copyright.html">Copyright</a> &copy; 2009</b> My Company. All rights reserved.</h3>
      <hr />
      <p>
        Visit <a href="/">Home</a>
      </p>

    </div>
  </body>
</html>

Which gets put at the bottom of most pages. And I'm really annoyed with these warning messages like Invalid location of tag (body). I know its invalid within this file but the other side belongs with header.html.

In Java classes you can suppress warnings with things like @SuppressWarnings("serial") ... Any way to do something like this with these HTML or JSP files?


Solution

    1. Right click on your project, Properties -> Validation (or you can go to Window -> Preferences -> Validation to do this globally).
    2. Uncheck "Build" for HTML syntax validation OR
    3. Click ellipsis under "Settings" and add a rule to exclude specific file name / extension / what have you