Eclipse3.6_javaee(helios)
jdk6.0.21
网上有好多关于乱码的说明,其实从根本上解决这个问题,就是页面编码和容器编码的相关配置.
1)配置JSP头文件编码(总共3处)
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2)tomcat的编码,在节点<Connector>加上下面属性
URIEncoding="UTF-8"
useBodyEncodingForURI="true"