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.

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

1 Answer 1

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.