title: HTML output with jsp:include and json-taglib
body: <p>I'm using jsp:include inside <a href="http://json-taglib.sourceforge.net/" rel="nofollow noreferrer">json-taglib</a>'s json:property element. The problem with this is that all HTML elements from included JSP page gets stripped at some point and only plain text remains. I have already stripped all newlines so the result shoud be valid JSON data.</p>
  
  <p>How do I get full HTML returned by json-taglib?</p>
  
  <p>Below is a snippet demonstrating the situation.</p>
  
  <pre><code>&lt;%@ page language="java" %&gt;
  &lt;%@ page pageEncoding="UTF-8" %&gt;
  &lt;%@ page contentType="text/html; charset=UTF-8" %&gt;
  
  &lt;%@ taglib uri="http://www.atg.com/taglibs/json" prefix="json" %&gt;
  
  &lt;json:object&gt;
    &lt;json:property name="id" value="${element.id}" /&gt;
    &lt;json:property name="html" escapeXml="false"&gt;
      &lt;jsp:include page="/templates/generate-component.jsp"&gt;
        &lt;jsp:param name="element_id" value="${element.id}" /&gt;
      &lt;/jsp:include&gt;
    &lt;/json:property&gt;
  &lt;/json:object&gt;
  </code></pre>