title: STS invalid location of tag warning in JSP file
body: <p>I'm getting a couple of weird warnings in a JSP file:</p>
  <blockquote>
  <p>Invalid location of tag (h4)</p>
  <p>Invalid location of tag (p)</p>
  </blockquote>
  <p>Here's my code:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body role=&quot;document&quot;&gt;
      &lt;div class=&quot;container container-white&quot;&gt;
          &lt;div class=&quot;list-group col-sm-12&quot;&gt;
          &lt;c:forEach var=&quot;recipe&quot; items=&quot;${resultList}&quot;&gt;
              &lt;a href=&quot;&lt;c:url value=&quot;/recipe/viewRecipe/${recipe.id}&quot;/&gt;&quot; class=&quot;list-group-item&quot;&gt;
                  &lt;h4 class=&quot;list-group-item-heading&quot;&gt;${recipe.name}&lt;/h4&gt;
                  &lt;p class=&quot;list-group-item-text&quot;&gt;${recipe.description}&lt;/p&gt;
              &lt;/a&gt;
          &lt;/c:forEach&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I'm using STS 3.6.4 and would prefer not to turn off html validation since it has been helpful in other contexts, given my spotty html skills. The code above is virtually identical to the Bootstrap sample <a href="http://getbootstrap.com/components/#list-group-custom-content" rel="nofollow noreferrer">Custom Content</a>. I saw some posts regarding blocking elements not being allowed within an <code>&lt;a&gt;</code> tag, but even the <a href="http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element" rel="nofollow noreferrer">W3</a> site has a similar example:</p>
  <pre><code>    &lt;aside class=&quot;advertising&quot;&gt;
      &lt;h1&gt;Advertising&lt;/h1&gt;
      &lt;a href=&quot;http://ad.example.com/?adid=1929&amp;amp;pubid=1422&quot;&gt;
          &lt;section&gt;
              &lt;h1&gt;Mellblomatic 9000!&lt;/h1&gt;
              &lt;p&gt;Turn all your widgets into mellbloms!&lt;/p&gt;
              &lt;p&gt;Only $9.99 plus shipping and handling.&lt;/p&gt;
          &lt;/section&gt;
      &lt;/a&gt; &lt;a href=&quot;http://ad.example.com/?adid=375&amp;amp;pubid=1422&quot;&gt;
          &lt;section&gt;
              &lt;h1&gt;The Mellblom Browser&lt;/h1&gt;
              &lt;p&gt;Web browsing at the speed of light.&lt;/p&gt;
              &lt;p&gt;No other browser goes faster!&lt;/p&gt;
          &lt;/section&gt;
      &lt;/a&gt;
  &lt;/aside&gt;
  </code></pre>
  <p>I tried adding the <code>&lt;section&gt;</code> tag to my code, but then I got the same invalid location warning on that tag.</p>
  <p>Any ideas?</p>
  <p><strong>EDIT:</strong>  I forgot to mention that the code as written does work correctly but I'd still like to get rid of the warnings, though, if possible. I've seen SO posts that mention Eclipse/STS JSP/HTML validation can be a bit flaky, but I haven't seen that in the 9 months I've been using it.</p>