Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

my problem is that the umlaut characters in an application pages (WAR) are not properly rendered when Tomcat is started as a service, but when I start the server manually it all looks good. I've checked the system's encoding (en_US.UTF-8) and it should working properly in both cases.

/etc/init.d/tomcat7

#!/bin/bash  
# description: Tomcat Start Stop Restart  
# processname: tomcat  
# chkconfig: 234 20 80  
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk  
export JAVA_HOME  
PATH=$JAVA_HOME/bin:$PATH  
export PATH  
CATALINA_HOME=/opt/tomcat  

case $1 in  
start)  
sh $CATALINA_HOME/bin/startup.sh  
;;   
stop)     
sh $CATALINA_HOME/bin/shutdown.sh  
;;   
restart)  
sh $CATALINA_HOME/bin/shutdown.sh  
sh $CATALINA_HOME/bin/startup.sh  
;;   
esac      
exit 0  

Can you please help me out with this problem?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Solution source here: Utf-8 in tomcat

Add the property -Dfile.encoding=UTF-8 to the CATALINA_OPTS variable or set it at runtime.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.