I am unable to read the body of a post to my开发者_运维百科 grails controller. This error is thrown
Caused by: java.lang.IllegalStateException: STREAMED
when I call
request.getReader()
There are some posting on message boards that say to add
parseRequest:true
To the URL mapping. I have done this with no change. Any Help?
Are you using a multipart form to uplod a file?
If you are, you can just call request.getFile() as Grails will have already read the input stream for you an create a MultipartRequest object.
If it's just a normal post, you might have to user request.getInputStream() instead of getReader as some other code has already called getInputStream() (which is why when you call getReader() it throws an exception).
cheers
Lee
精彩评论