Servlet running jump page into a download interface, or Chinese garbled


1. The problem is this place, had the wrong Setvlet not recognize HTML file, into a download.
2. This is to prevent the Chinese garbled

// set the response content type
response.setContentType ( "text / html; charset = utf-8 ");

// handle Chinese garbage problem
request.setCharacterEncoding (" UTF-8 ");
response.setCharacterEncoding (" UTF-8 ");

Guess you like

Origin www.cnblogs.com/zxx7777777/p/11479325.html