title: JSF + JSON: Output "plain" text in servlet?
body: <p>I'm trying to use Mootools (<em>Request.JSON</em>) together with JSF - mainly because I wrote a similar application in CakePHP some time ago and would like to reuse most of the JS part.</p>
  
  <p>Is there any way to return <em>plain text</em> ("application/json") using an request from something like a markup-less facelet?</p>
  
  <p>The only solution I came up with was using an <em>HttpServlet</em> and registering it to a service URL in web.xml. That approach works and really returns an file without any markup, but I'd rather use my Spring-injected ManagedProperties than being restricted to WebApplicationContextUtils.</p>
  
  <p>Did I miss something or is that the recommended way?</p>