tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat @ Windows & Cyrillic
Date Tue, 15 Apr 2014 20:41:54 GMT
Petr Nemecek wrote:
> Hi all,
> 
> I need to use cyrillic in my webapp.
> 
> What I did:
> * Added -Dfile.encoding=utf-8 to the Java options
> * Added URIEncoding="UTF-8" to the connector in server.xml
> 
> What I achieved:
> * When I send a request with cyrillic chars to the Tomcat, it's properly
> received.
> * When I send response with cyrillic chars out of the Tomcat, it's properly
> sent.
> 
> What I did not achieved (and asking you kindly for help):
> * When my webapp, sitting in the Tomcat, sends a request containing cyrillic
> chars, these don't go out. So when I try to send out e.g.
> "PrahaСимферополь", just "Praha" goes out. By sending out I mean calling cxf
> web service. When I call that webservice directly (from jar, not from
> Tomcat), everything works fine.
> 
> Any idea?
> 

When an application (running under tomcat or not) "sends a request" to some external 
service, it uses some code to do that, which is not part of the tomcat code.
Which code/library are you using for that ?
In how much could this code/library be influenced by the fact that it is running under the

JVM which runs Tomcat (and the settings of that Tomcat JVM) ?

More explicitly : a Java application doesn't just "run". It is "being run" by the JVM that

runs it.  That JVM runs with certain settings (say, "system properties") which influence 
the way in which it runs the applications which it runs.

On thing which has happened to me in the past (and I really don't know if this is still 
applicable) is as follows :
Tomcat starts, under some JVM settings appropriate for your application.
Then it runs various applications, including yours.  One of the other applications, for 
whatever reason of its own, changes a JVM system property. And because this is a 
JVM-global property, this new setting now interferes with your application when it runs.

(And the case of which I am talking, happened to concern some default language setting; 
and this caused my application to suddenly start outputting messages in English instead of

the expected German).

This would of course not happen, when you run your application stand-alone, because then 
there are no other applications to mess with the JVM system properties.

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


Mime
View raw message