在jsp页面中设置编码时,下面两句,功能上有什么区别吗?
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

解决方案 »

  1.   

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    是在HTTP协议中指明的.<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    是浏览器的设置.个人意见.
      

  2.   

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">应该是最终结果.lz 可以测试下,两个冲突。最后页面呈现默认编码是什么  我认为是meta 里面定义的