getParameterMap() missing passed parameter that is in getQueryString()

304 Views Asked by At

I have a java servlet app that we are porting from WebSphere to TC Server and upgrading from java 2 to java 7.

In testing we discovered that parameters ending in a % sign (including passwords) were being lost.

here is an example fragment

https://xxx.xxx/servletname?userName=abcdefg&password=abcdefg&folderName=ABCDEFG&Cycle%20Date=05/16/14&Account%20Number=815010009023%

Account Number is not in the parameterMap.

During research I discovered.

if I interrogate the request object first thing, the getQueryString() has my parameter, but ... getParameterMap() filters it out.

So, it works on the old WebSphere/Java 2 version, but not in the TC Server/Java 7 version.

Things I've tried.

  request.setCharacterEncoding("utf-8") at the top of the doGet - no affect.
  <Connector ... URIEncoding="UTF-8" ... </Connector> in my server.xml - no affect.
1

There are 1 best solutions below

0
On BEST ANSWER

Putting a dangling percent like that is probably an illegal URL since it's an incomplete byte. The behavior's going to be undefined.