Configure tomcat startup parameters

In addition to setting the memory size of jvm, this startup parameter also sets the encoding of tomcat. Some projects require encoding that is not utf-8 encoding. At this time, the encoding of tomcat needs to be modified.

Modify the file catalina.sh or catalina.bat, this depends on the environment

Add JAVA_OPTS=" -Xms1024m -Xmx1024m -Xss512K -XX:PermSize=256m -XX:MaxPermSize=256m $JAVA_OPTS -Dfile.encoding=GBK" in the first line

This needs to increase

If it is a windows environment, add set in front

Note: After linux changes this file, tomcat may not be able to start, and it will report that the file cannot be found. At this time, you need to check the file permissions. Linux has been modified and you have to re-assign permissions.

Guess you like

Origin blog.csdn.net/caicai250/article/details/80334389