Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having problems with the character encoding of my webapp and would like to know how I can go about changing the default encoding of tomcat on the Linux production server to match the cp 1252 encoding of the dev server on windows (or at least experiment with different encoding until I can find the right one).

Thanks

share|improve this question
up vote 1 down vote accepted

Add this to your catalina.sh script:

set JAVA_OPTS=-Djavax.servlet.request.encoding=Cp1252 -Dfile.encoding=Cp1252

Also in conf/server.xml you want to make this change so the URI encoding is set accordingly:

<Connector port="8080" URIEncoding="Cp1252"/>
share|improve this answer
    
Awesome!! I'll add this and let you know how it turns out. – Dark Star1 Feb 17 '11 at 15:32

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.