title: JSP Custom Taglib: Nested Evaluation
body: <p>Say I have my custom taglib:</p>
  
  <pre><code>&lt;%@ taglib uri="http://foo.bar/mytaglib" prefix="mytaglib"%&gt;
  &lt;%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%&gt;
  
  &lt;mytaglib:doSomething&gt;
    Test
  &lt;/mytaglib:doSomething&gt;
  </code></pre>
  
  <p>Inside the taglib class I need to process a template and tell the JSP to re-evaluate its output, so for example if I have this:</p>
  
  <pre><code>public class MyTaglib extends SimpleTagSupport {
  
    @Override public void doTag() throws JspException, IOException {
      getJspContext().getOut().println("&lt;c:out value=\"My enclosed tag\"/&gt;");
      getJspBody().invoke(null);
    }
  }
  </code></pre>
  
  <p>The output I have is:</p>
  
  <pre><code>&lt;c:out value="My enclosed tag"/&gt;
  Test
  </code></pre>
  
  <p>When I actually need to output this:</p>
  
  <pre><code>My enclosed tag
  Test
  </code></pre>
  
  <p>Is this feasible? How?</p>
  
  <p>Thanks.</p>