Home > Back-end >  Tomcat8.5 after startup project (including Eclipse startup), static page displays the code solution
Tomcat8.5 after startup project (including Eclipse startup), static page displays the code solution

Time:12-09

Problem is: the static page write death in Chinese, in the Tomcat service starts, the browser to access, according to the code (not discussed before and after the end data transmission garbled),
1, to confirm whether the HTML file specified coding format for utf-8, similar to & lt; Meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;
2. Verify that the file encoding to utf-8, eclipse, right click on files - & gt; The Properties - & gt; The Text file encoding check coding format;
After confirm the above two no problem, try to do the following:
1, if it's in eclipse to start the service, then double-click the Servers in the Tomcat8.5 - & gt; General Information - & gt; Open the launch configuration - & gt; Common - & gt; Utf-8 Encoding choose - & gt; Click OK and then restart the services;
2, if it is deployed to the Tomcat8.5, under the bin directory of the Tomcat, to catalina. Bat file setlocal line feed after increasing the following configuration
 set "JAVA_OPTS=- Xms512m - Xms1024m - XX: MaxPermSize=1024 m - Dfile encoding=utf-8" 

Save after restart the service, the JVM Settings according to the actual situation to value;

CodePudding user response:

1 and 2 have no relation, the browser has a browser display code, Eclipse Eclipse display code, two is this place
  • Related