Caldarale, Charles R wrote:
From: Alan Chaney [mailto:a...@compulsivecreative.com]
Subject: Re: Reading POSTed data

I don't want to appear picky, but that doesn't actually seem that problematic. If you don't set the content type
as application/x-ww-form-urlencoded then you should be
able to read it via the input stream

Agreed; I must have missed that sentence when I originally went exploring when 
the question came up.

Or as "multipart/form-data"...
Now this raises an additional nitpicking question :
It has been mentioned before, that Tomcat provides no standard mechanism to read POST parameters that have been sent that way.
But, the servlet spec 3.0, at the end of section 3.1, says :

"Data from the query string and the post body are aggregated into the request parameter set. Query string data is presented before post body data. For example, if a request is made with a query string of a=hello and a post body of a=goodbye&a= world, the resulting parameter set would be ordered a=(hello, goodbye, world)."

Now, considering that, for a html <form>, it is entirely valid to send form parameters using the "multipart/form-data" encoding, and considering the above paragraph, where does that leave us ?

It should mean that the getParameterMap() method, for instance, has at least to "peek" at the body, determine if it /could/ contain parameters, and if yes parse it to extract them. If it does, then Tomcat /does/ contain code that can parse a multipart/form-data body.
If it doesn't, then Tomcat does not respect the servlet spec.
Or ?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to