Does Struts 2 have support for sending JSON HTTP responses natively? I mean, I can use the println() method from the HttpServletResponse output stream when it comes to Struts 1.2.x in order to generate a JSON response, but, in my opinion, this is not elegant.
If there's no "native" support, would there be a plugin or something?
In addition to the afore-mentioned JSON result the REST plugin of Struts 2.1 also supports JSON responses, in addition to XML and XHTML, based on the requesting URI.
In other words, if we request we'd get JSON back, if we request we'd get XML back. We can also set the default response type so we can leave off the extension altogether.