表达式语言中文乱码问题
index.jsp如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
My JSP 'index.jsp' starting page
<%request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
%>
[color=red] 刘备[/color]
1.jsp如下:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
My JSP 'index.jsp' starting page
<%request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
%>
[color=red]/c:out[/color]
index.jsp传过来的是中文,但1.jsp接收到的是乱码。具体应该怎么改,看了几篇关于中文乱码问题的文章,但都不管用。
找到tomcat \conf
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />
试试