I'm implementing a rest service in grails so I created a controller:
class LoaderController {
def index = { }
def save = {
String input = params.er3f
render 'OK'
}
}
And added the following in UrlMappings:
"/loader/$id?" (controller:loader) {
action = [GET:"save"]
}
When I run http://localhost:8080/MyApp/loader?er3f=12345678, I get a 404 and description The requested resource (/MyApp/WEB-INF/grails-app/views/loader/index.jsp) is not available.
But when I run http://localhost:8080/MyApp/loader/save?er3f=12345678 works OK.
What's wrong with my UrlMappings?