<2965be97-e388-4b69-8400-e1c7d0c68...@j21g2000yqh.googlegroups.com>,
[Please do not quote signature lines.]
Hi John,
Thanks for the reply. The problem here is opposite
.
I see the data in request.getQueryString() method. But when I try to
get the same parameter using request.getParameter("action") it
returns me a null value.
Its happening intermittently and not always. The only change I have
done in my App is to use Apache mod_rewrite module to do URL
rewriting instead of using urlrewritefilter-2.6.0.jar which handles
URL rewriting in java.
OK, getParameter() returns null; how about "If the parameter data was
sent in the request body, such as occurs with an HTTP POST request, then
reading the body directly via getInputStream() or getReader() can
interfere with the execution of this method."
I'm using tomcat 6 and this example and diff:
< out.println(rb.getString("requestparams.params-in-req") + "<br>");
> out.println(rb.getString("requestparams.params-in-req")
> + " " + request.getQueryString() + "<br>");
< out.println("method=POST>");
> out.println("method=GET>");
Hi John,
I reverted back my changes to Tuckey URL rewrite and everything seems
to be working fine.
The only reason that I could suspect here is, In the mod_rewrite.conf
I am using the below mentioned rule:
RewriteRule /test/([^/?]+)[?]*(.*) /TestServlet?action=$1 [QSA,L,PT]
My request is coming as a POST and action parameter is appended into
URL which means it will be a GET. request.getParameter intermittently
tries to read from request body as the request type is POST but the
action parameter is present in the url.
I am not sure if this is actually the reason, because then it should
fail for every request but it's failing randomly. Some times all the
URLs are successful.