On 3 nov, 20:24, JuDaC <judac2...@gmail.com> wrote: > Tercio, had made that. > > GWT do read the post body using InputStream. What I do is to make this > read before, in my valve, and put this content on the parameters. On > the RemoteServiceServlet I had to override the method readContent, so > I can get the value from the parameter and not from > "RPCServletUtils.readContentAsUtf8(request, true);" > > I was wondering if exist a different way to get that, but not (I > didn't find a different way :( ).
If keeping the content in memory really isn't an issue for you (for GWT-RPC it shouldn't, but if your valve is also "triggered" for, say, file uploads, ouch!) the you could just read the request's payload into a memory buffer and pass an InputStream on that buffer down the chain. I don't know how it's done in Tomcat valves, but it works pretty well with servlet filters (when "chaining", pass a wrapper on the request that overrides the getInputStream and related methods). Of course, you can apply the same recipe and read into a temporary file instead of a memory buffer; there's code that do this (not invoked in a filter, but it should work the same) here: http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/source/java/org/alfresco/repo/webdav/WebDAVMethod.java (search for HttpServletRequestWrapper) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.