In my Grails controller I\'m responding to an AJAX call and using render to return the text:
render
def ajaxRandomPersonName = { def person = get a ran
Make your client side javascript code handle a JSON respond and render your response with:
render [text:"Name: ${person.name}"] as JSON