Hello, Christopher ! The "user.language" and "user.country" system properties for my running Tomcat instance are not set. In Oracle Apllication Server I also do not see these properties set in "ps -ef | grep java" output. I set both properties in JAVA_OPTS env.var:
[oracle@n36 logs]$ echo $JAVA_OPTS -XX:MaxPermSize=128M -Xms256m -Xmx1024m -Duser.language=ru -Duser.country=RU Check whether java process has these settings: [oracle@n36 logs]$ ps -ef | grep java oracle 17311 1 18 13:31 pts/0 00:00:41 /u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/jdk-6u38-linux/jdk1.6.0_38/bin/java -Djava.util.logging.config.file=/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XX:MaxPermSize=128M -Xms256m -Xmx1024m -Duser.language=ru -Duser.country=RU -Djava.endorsed.dirs=/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/endorsed -classpath /u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/bin/bootstrap.jar:/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/bin/tomcat-juli.jar -Dcatalina.base=/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47 -Dcatalina.home=/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47 -Djava.io.tmpdir=/u02/apache_software/apache-tomcat-7.0.47/apache-tomcat-7.0.47/temp org.apache.catalina.startup.Bootstrap start oracle 17369 17164 0 13:35 pts/0 00:00:00 grep java After setting "user.language" and "user.country" I tested servlet on Tomcat 7 again but it didn't help, trouble persists. What else are to be fixed in Tomcat conf ? thank you, Timur PS: I'm in Kazakhstan, at GMT+6, so sorry for delay with answer. 2014/1/14 Christopher Schultz <ch...@christopherschultz.net> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Тимур, > > On 1/13/14, 11:34 AM, Тимур Кулибаев wrote: > > Dears, I have checked documentation/FAQ/WEB/archives but it didn't > > help to resolve the following trouble: I have a java servlet which > > is currently deployed on Oracle Application Server 10g R3 with jdk > > 1.5u19 on RHEl 5.7 and one works fine with Oracle Application > > Server. The servlet works with Oracle Database which has cyrillic > > single-byte codepage CL8MSWIN1251. The servlet was migrated from > > Oracle Application Server 10g R3 to Tomcat 7.0.47. I use Tomcat > > 7.0.47 with jdk-1.6u38 on RHEl 5.7. The servlet works fine with > > Tomcat 7 except only trouble with some characters displaiyng. > > > > The point is that there is a special language driver for Windows > > which provides Kazakh extension for codepage Windows-1251. The > > language driver works in single-byte codepage named RK-1048 which > > is almost the same as widely known Windows-1251 codepage. Only > > difference between Windows-1251 and RK-1048 is that RK-1048 has > > several specific Kazakh letters added (Kazakh alphabet equals > > Russian alphabet plus several specific letters of Kazakh > > language). > > > > The trouble is that specific Kazakh letters are not displaying > > correctly in servlet on Tomcat 7 but on Oracle Application Server > > all specific Kazakh letters are displayed correctly. Servlet > > operates by GET-requests when send data to server. So in my > > understanding I must get Tomcat worked in Windows-1251 for > > GET-requests. Also, UTF-8 is not suit for me as database is in > > single-byte codepage. > >> From Tomcat 7 documentation: > > "....There are two ways to specify how GET parameters are > > interpreted: 1.Set the URIEncoding attribute on the <Connector> > > element in server.xml to something specific (e.g. > > URIEncoding="UTF-8"). 2.Set the useBodyEncodingForURI attribute on > > the <Connector> element in server.xml to true. This will cause the > > Connector to use the request body's encoding for GET parameters." > > > > I have tried URIEncoding and useBodyEncodingForURI on > > http-connector but it doesn't help. > > > > <Connector port="7785" protocol="HTTP/1.1" > > connectionTimeout="20000" redirectPort="8443" > > URIEncoding="Windows-1251" /> > > > > or > > > > <Connector port="7785" protocol="HTTP/1.1" > > connectionTimeout="20000" redirectPort="8443" > > useBodyEncodingForURI="true" /> > > > > or <Connector port="7785" protocol="HTTP/1.1" > > connectionTimeout="20000" redirectPort="8443" > > URIEncoding="Windows-1251" useBodyEncodingForURI="true" /> > > > > Why Oracle Application Server works fine with RK-1048 codepage but > > Tomcat 7.0.47 does not ? > > What are the "user.language" and "user.country" system properties for > your running Tomcat instance? > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJS1FSkAAoJEBzwKT+lPKRYv2sQALV3fEs9cBdPLE3RTEcapCOH > dAkaeuKK9MS60RAemVwP6okqzD0ect/dwVQA1Pi6yMzKTKXPdDWwif1rhlxOjAjY > YvzwBhRGKdaM7C4vPLoasBRC6bVUDPS9Ct0JAVnBbBOS8qKXc38BcBb+yXwjyGml > OlGzUzN8d/1VVjAU6WlIHx1AAcXj0eL7fD7m6B10w3bYx5kPdN/CY0rV2Scv5VnZ > aFrv9kkLQjEsaG5/rljt7ff/UprLRupOunsBGV6RwKQ/o+UMrlDevm91F+QOW+oM > DkCXNKLbwSXzyVgRyAnY9RsGAN11m8F/wRZxkdvDQUMdztBSm4dvGr0e1rflN4Lc > Bh84UtzYihwLkcT3vtNPnTnqCprdF6Bvddu19DpjYiZiyiVPBi6/DA4WQAWuHASh > VogL+PZYYEoZjID6azZtSPJN7ufLxbrvwrsB8L837wv7+bF+t/v8vbVbvjUsFKzP > TwcyNyk6kVRdXiCPu6PSZPYeKhfPRK6s28kCY5O5KF9gJxF++LMVHQ7t5sbBCpC4 > RIki+aIbz0nEtNYfcV9xyHgkOI/nx4T0QIVVhH0b7nvaUKiu4QVeYKcXR4Q4Qj/3 > 3VuhSETxkfzlVmowzQaZvlMSLNB0cpzmq4QQwdOCG83D2gfZhEcMxCDgI/cxPZmh > USKdg3dMF23ph0J1QM9W > =9YsA > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >