I found for Tomcat on Windows, the following worked.
If the Tomcat AppServer is configured as a Windows Service, you need to run the tomcatw.exe command and then enter the values in the fields as per below:
Restart Tomcat and check the Catalina log. You should see something like this:
If the Tomcat AppServer is NOT configured as a Windows Service, you need to create file setenv.bat in the Tomcat bin folder and add the following entries:
set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -server -Xms512m -Xmx2g -Xss4m
You should see something like this in the catalina.log