Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable HTML Warnings in Eclipse for Java EE developers edition

Tags:

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?

like image 462
Bernie Perez Avatar asked Dec 16 '09 21:12

Bernie Perez


People also ask

How do I show all warnings in eclipse?

Click on the small triangle in the upper right corner of the problems view and select "Configure Contents". In that dialog check "Show all items" and uncheck "Use item limits" to show all warnings.


1 Answers

  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
like image 180
ChssPly76 Avatar answered Oct 06 '22 13:10

ChssPly76