Change Tomcat's Charset.defaultCharset in windows

前端 未结 4 534
梦毁少年i
梦毁少年i 2020-12-03 03:06

I\'m using tomcat 6.0.32 in windows 7. Inside a very simple servlet, inside the init method, I\'m printing:

System.out.println(Charset.defaultCharset());
         


        
4条回答
  •  独厮守ぢ
    2020-12-03 03:53

    Just create a setenv.bat file inside the TOMCAT/bin directory with the following contents:

    set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8"
    

提交回复
热议问题