Problems when introducing HTML files with the include directive in JSPs:
JSP and HTML can be correctly displayed, when the JSP introduced HTML Access JSP page HTML garbled, JSP original output no garbled, solution:
In the first line of HTML join: <%@ page language= "java" import= "java.util.*" pageencoding= "GB18030"%>
The encoding format for the JSP is: <%@ page language= "java" import= "java.util.*" contenttype= "Text/html;charset=utf-8" pageencoding= " UTF-8 "%>
Problem solved, as for why still in the thinking ...
The solution to the problem of converting HTML pages to JSP pages is garbled:
Suppose the original HTML code is UTF-8
Add at top of HTML
<%@ page pageencoding= "Utf-8"%>
And then modify the suffix to. JSP, that is, modify the encoding format before converting to a JSP file
JSP garbled problem when introducing HTML with include directive