eclipse设置jsp文件编码格式

一、设置jsp文件本身的编码

eclipse 的window-->prefrences -->general -->content type中可以设置不同文件格式的编码

 

二、设置jsp里边的编码

<%@ 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">
<title>Insert title here</title>
</head>
<body>

</body>
</html>

eclipse 的window-->prefrences -->Web-->JSP Files 可以设置jsp文件的编码

 

猜你喜欢

转载自happyqing.iteye.com/blog/1973815