jsp静态引入(<%@ include file=""%>)引生的乱码问题
参考原文:
-
JSP通过include标签引入html出现乱码问题https://blog.csdn.net/yan245294305/article/details/83623123
-
jsp通过include指令引入html乱码的解决方法https://blog.csdn.net/gnail_oug/article/details/51707061
-
<%@ include>引生的编码问题https://blog.51cto.com/guojuanjun/1225232
https://blog.51cto.com/guojuanjun/1225232
jsp中的pageEncoding和contentType的charset属性:
-
pageEncoding是jsp文件本身的编码,是指定web容器将jsp编译成java文件时采用什么编码读取jsp文件。
-
contentType的charset设置的编码是指服务器响应给客户端时的内容编码。
-
在html中我指定了,是html文件的编码,作用是告诉客户端展示这个html文件时用utf-8编码.