tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: request.getParameter() not working in Tomcat 7.0.8
Date Sun, 27 Feb 2011 17:08:07 GMT
On 27/02/2011 07:11, Michael McCutcheon wrote:
> I've got a simple problem where:
> 
> request.getQueryString() returns this:
> 
> "title%3Dtesttitle%26categoryAccessLabel%3Dtestcategoryaccesslabel%26valueAccessLabel%3DtestvalueAccessLabel"
> 
> 
> but request.getParameter("title") returns null.
> 
> Am I missing something obvious?
> 
> Shouldn't it be returning 'testtitle'?

Nope, because you encoded the = and & characters. What you have is a
single query parameter with a name of
"title%3Dtesttitle%26categoryAccessLabel%3Dtestcategoryaccesslabel%26valueAccessLabel%3DtestvalueAccessLabel"
and a value of null.

For those that want the details, take a look at the source for
org.apache.tomcat.util.http.Parameters.

Mark

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


Mime
View raw message