J
John C. Bollinger
Miguel said:What if I have a form like this:
<form action="blah?displaymode=update§ion=3" method="post">
...
I know that its probably not good practice, but that's how my boss wants it.
I wondered whether you were doing something like this. Is there any
real need to draw a distinction? The ServletRequest parameter access
methods will provide access to a combination of the query string and
message body parameters. Would it actually be a problem if parameters
that were usually provided in the form data were provided in the query
string instead, or vise-versa? If your application depends on such
distinctions then it is likely quite brittle.
If you really do need to perform this sort of check then you can use
HttpServletRequest.getQueryString() and parse the result yourself.
Although I hesitate to even mention it, there is also the deprecated
javax.servlet.http.HttpUtils class that provides methods you might be
able to use -- but it is deprecated, so I don't recommend it.
John Bollinger
(e-mail address removed)