Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

tomcat unable to parse HTTP GET variables if & is replaced with %2526

Isaacson, David A. (James Tower)

2005-10-11


Running

apache: httpd-2.0.46-46.3.ent

tomcat: jakarta-tomcat-4.1.30

using the mod_jk connector.





Earlier yesterday we started recieving the following error.

java.lang.NumberFormatException: For input string:
"888888%26order=44%26start=3%26end=3"



The page started to get refered to by another website, and the link that
they are using is:

http://www.mysite.com/mypage.jsp?item=888888%2526order=44%2526start=3%25
26end=3



When I follow that link, it doesn't work, and it displays that it
couldn't handle the input string

"888888%26order=44%26start=3%26end=3" (notice that the %2526 in the
referring url now is a %26)



%25 = %

%26 = &



so it looks like the %25 is converting to the %, but then the recurring
%26 is not getting converted to the &, which is causing tomcat not to be
able to parse the variables.



Is this an apache or tomcat misconfiguration/bug? I've been searching,
but unable to find any answers.



Any ideas on how to resolve this would be helpful. Sorry if this topic
has been brought up before. I was unable to find any hits on google, or
searching the mailing list archive.



Thanks,



Dave.

©2008 junlu.com - Jax Systems, LLC, U.S.A.