title: Why do I have to suppress XML excaping in this scenario
body: <p>I am working with a servlet that adds markup to text documents.
  For example, it might produce the following sentence</p>
  
  <p>according to <code>&lt;span class="legalTerm"&gt;the plaintiff&lt;/span&gt;</code> the contract was never signed</p>
  
  <p>In my jsp I have the following css, html and jstl:</p>
  
  <pre><code>&lt;style&gt;
  .legalTerm {
      background: lightgrey;
      color: blue;
      font-size: 16px;
      font-weight: bold;
      text-align:center;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;c:out value="${document}"&gt;&lt;/c:out&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run the app the document that is displayed in the browser looks like:</p>
  
  <pre><code>according to &lt;span class="legalTerm"&gt;the plaintiff&lt;/span&gt; the contract was never signed
  </code></pre>
  
  <p>When I look at the page source I see:</p>
  
  <pre><code>according to &amp;lt;span class=&amp;#034;legalTerm&amp;#034;&amp;gt;the plaintiff&amp;lt;/span&amp;gt; the contract was never signed
  </code></pre>
  
  <p>I was able to get correct behavior by suppressing XML escaping</p>
  
  <pre><code>&lt;c:out value="${document}"  escapeXml="false"&gt;&lt;/c:out&gt;
  </code></pre>
  
  <p>My question is: is this how it should be done?<br>
  Or am I missing something that would eliminate the need to suppress XML escaping?</p>