title: Why Can't JSP 2.0 Tag Files Have Body-Content of "JSP"?
body: <p>The "new" JSP 2.0 tag file tags are incredibly useful, and for most cases (at least that I've seen) they provide a far more readable format than a Java class.  However, while tag files can do <em>almost</em> everything a Java class tag can do, there is one giant thing they can't do: have "scripting" body content (ie. "&lt;%" stuff between the start and end tags).</p>
  
  <p>So, my question is multi-part:</p>
  
  <ol>
  <li>Does anyone know why (from a design standpoint) this is?  Is it inherently impossible for tag files to have such content due to the way they are implemented or something?</li>
  <li>Does anyone know if there are any future plans to allow for body-content="JSP" in tag files (in a future version of the JSP standard maybe)?</li>
  <li>Does anyone know of any way to "hack" tag files to allow them to have scripting content (like by having a body-content of scriptless, and then processing the contents somehow)?</li>
  </ol>
  
  <p>Basically my dream is to someday write tag files which don't result in exceptions if someone puts a</p>
  
  <p><code>&lt;%= myVar %&gt;</code></p>
  
  <p>inside, and I'm just trying to determine whether that dream is hopeless or not.</p>