I am developing a grails application which uses lot of ajax.If the request is ajax call then it should give response(this part is working), however if I type in the URL in the b
Since Grails 1.1 an xhr property was added to the request object that allows you to detect AJAX requests. An example of it's usage is below:
xhr
request
def MyController { def myAction() { if (request.xhr) { // send response to AJAX request } else { // send response to non-AJAX request } } }