-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kyle,
On 6/16/2009 11:24 PM, Kyle Brantley wrote: > The getParameter() calls are going to be of little to no value for me. > The data isn't in a form where those calls would recognize them. Unless > I'm missing something very obvious...? No, if you're sending a whole document, then the getParameter calls will not be useful to you. > But thanks for the bit about the possible interference in method calls. getParameter and friends will only read the request body if: 1. The request is HTTP or HTTPS (duh) 2. The request method is POST 3. The Content-Type is application/x-www-form-urlencoded Since your Content-Type is text/xml, the request body should be available via request.getReader (preferred for text formats) or request.getInputStream. Note that InputStream.available() returning 0 just means that the next call to InputStream.read(...) will block before returning data. It doesn't mean that there's no data that could be read. When InputStream.read returns -1, that's when you know the stream is out of data. I disagree with Chuck's assertion that POST is inappropriate unless form data is being sent. The only really appropriate HTTP methods for sending lots of data are POST and PUT. PUT is (IMO) not appropriate because the client is expected to provide the URI where the resource should be available later. HTTP section 9.6 says it plainly: " The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. [...] In contrast, the URI in a PUT request identifies the entity enclosed with the request -- the user agent knows what URI is intended and the server MUST NOT attempt to apply the request to some other resource. " I like POST for your requirements. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAko5Jr0ACgkQ9CaO5/Lv0PB33gCcDcbGVQWRJFKa0sYWOyUOhJr1 ViIAn35KtGzaBJmG0dz8KaWhe6jtZimj =JEyB -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org