According to the document on command objects and data binding. Once you read the params object, that object can never be reused again.
From the documentation:
Binding The Request Body To Command Objects http://grails.org/doc/2.3.x/guide/theWebLayer.html#commandObjects
Note that the body of the request is being parsed to make that work. Any attempt to read the body of the request after that will fail since the corresponding input stream will be empty. The controller action can either use a command object or it can parse the body of the request on its own (either directly, or by referring to something like request.JSON), but cannot do both.
I'm trying to view the parameters within a filter (which is hit before the controller is requested). Would logging the parameters to a log cause the controller to get a null param object? From the documentation that looks to be the case. However, how can I get access to the params without wiping them out in the filter?
InputStream
so once it is read, you are at the end of the stream so it can't be read again. Request parameters can be accessed repeatedly, as many times as it makes sense. – Jeff Scott Brown