I'm trying to use Mootools (Request.JSON) 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.
Is there any way to return plain text ("application/json") using an request from something like a markup-less facelet?
The only solution I came up with was using an HttpServlet 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.
Did I miss something or is that the recommended way?