You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by koney krishna <ko...@yahoo.com> on 2004/09/20 17:50:28 UTC

Tomcat QueryString Encoding/Decoding Issue

I am struck up with getQueryString() method in HTTPServletResponse?

I have a query String which is UTF-8 based ; 

ex:
http://localhost:8080/test.html?user=H%C3%BC%C3%9F


When I use HTTPServeletRequest.getQueryString() I get a garbled QueryString.
I get H%C3%83%C2%BC%C3%83%C2%9F where as I should get it as 
H%C3%BC%C3%9F
Which UrlEncoding does getQueryString() ???

It looks like Tomcat is URLEncoding again the QueryString so I am getting garbled QueryString.
Is there anyway to get the raw Query_String than using getQueryString() in Tomcat ?

I have changed the Server.xml ( for setting URLEncoding="UTF-8" ) & web.xml ( to enable setCharacterEncoding = UTF8 )

Please help me !!

I am struck up with this error from last 2 weeks.

thanks

kris

		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

RE: Tomcat QueryString Encoding/Decoding Issue

Posted by Mark Thomas <ma...@apache.org>.
From: koney krishna [mailto:koneykishore@yahoo.com] 
> I have changed the Server.xml ( for setting 
> URLEncoding="UTF-8" ) & web.xml ( to enable 
> setCharacterEncoding = UTF8 )

Are you really using URLEncoding="UTF-8"? It should be URIEncoding="UTF-8"

Also, what version of tomcat?

Mark



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