title: Manipulating JSPX template output in SpringMVC
body: <p>I'd like to get the string output of running a JSPX template, so that I can javascript-string-escape it and use it in a JS snippet.  </p>
  
  <p><a href="https://stackoverflow.com/a/13721859/684934">https://stackoverflow.com/a/13721859/684934</a> shows a way to do it with plain servlets, but I'm concerned that this method may not play nicely with SpringMVC (my controller methods don't actually receive the request and response objects, and my understanding is that jspx uses its own templating engine).</p>
  
  <p>Are there any built-in ways to do this?</p>
  
  <p>The motivation is that I'd like to do what is common practice in Ruby on Rails: re-use the view partials to draw results of ajax calls.</p>