David Newton wrote:You might have to post the entire example; I've never seen this behavior, so I'd have to try it locally.
Pradeep Adibatla
Anbarasu Aladiyan
Pradeep Adibatla wrote:but I don't know what should exactly come there...
David Newton wrote:Why would you want to do that (the mapping replacement)? You're not sending back HTML. The "json" result already defaults to something reasonable, and has its own "contentType" parameter.
http://cwiki.apache.org/WW/json-plugin.html
Anbarasu Aladiyan
It should be the root object you're serializing to JSON and sending to the client.
Also in my last project i did it in the same way as i said, that is "Creating JSON" in action class using json plugin and streaming it to jsp pages.
I want to populate all cities of the country selected,so,I prepared json for all cities based on country selected...
Anbarasu Aladiyan
So if you had an action property named "cities" that would be your root.
David Newton wrote:That's *so* much extra, unnecessary work.
Anbarasu Aladiyan