tags:

views:

93

answers:

1

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?

+1  A: 

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

leebutts
I think i'll look into using a multipart post. I'll give it a shot on monday and let you know. I have already tried getinputstream() and it returns an empty stream. thanks
Joe Cannatti