You can try grails web services, for example; REST can be used and you can call your grails application through a url and can pass parameter to it through POST, GET and handle them on grails controller
you can call a URL and handle the url paramters on the URL mapping:
for example if you call your grails app through some URL: product/ then you will be able to handle the request on your grails app as:
"/product/$id"(controller: "product", parseRequest: true) {
action = [GET: "show", PUT: "update", DELETE: "delete", POST: "save"]
and in your controller you can parse the request like:
if( request.method == "GET" ){
println( "GET REQUEST RECEIVED" )
<......Some Code........>
render resultList as JSON
}else if( request.method == "POST" ){
println( "POST REQUEST RECEIVED" )
<......Some Code........>
render resultList as JSON
}
}
request and reponse can be handled in xml or JSON format, have a look at: http://grails.org/doc/2.2.1/guide/webServices.html#REST