tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Seibert <>
Subject quotes wrong under (my) Tomcat environment
Date Wed, 26 Jan 2011 22:25:51 GMT
Hi there,

actually I have the problem, that the static encode method from encodes
under the command line different as the tomcat environment on my machine (my workmate with
exactly the same setup - see below - doesn't have this problem).

The char "@" is not quoted to "%40" while running under tomcat (servlet).

Any idea which java System environment variable could affect this behavior? And which role
tomcat plays with this error?

Under the command line:
System.out.println(URLEncoder.encode("an@", "UTF-8")); => an%40

Under Tomcat (in a servlet):
System.out.println(URLEncoder.encode("an@", "UTF-8")); => an@

My system:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

Tomcat version: 6.0.20

Mac Os X 10.6.6

Thanks a lot for your help.
Jo Seibert

View raw message