Hi there,

actually I have the problem, that the static encode method from 
java.net.URLEncoder 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?

Example.
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.
Yours 
Jo Seibert
www.twitter.com/jseibert


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to