my dog learned polymorphism
The moose likes Groovy and the fly likes render JSON in grails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "render JSON in grails" Watch "render JSON in grails" New topic

render JSON in grails

Maharaj thak

Joined: Jul 29, 2010
Posts: 27
I have an index.gsp page where I am trying to implement jquery autocomplete.My action is called Search which is in SearchController.If I do
render someObject as JSON does the json data go back to index.gsp or do I have to create search.gsp.
Any help would be greatl appreciated.

Mauji Thak

David Newton

Joined: Sep 29, 2008
Posts: 12617

It goes back to whatever made the request: if it's an Ajax request it'll go back to the Ajax request object and its handlers.
I agree. Here's the link:
subject: render JSON in grails
It's not a secret anymore!