一、设置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文件的编码
本文详细介绍了如何在Eclipse中设置JSP文件本身的编码和页面内部的编码,包括通过窗口->首选项->内容类型进行全局设置,以及在JSP页面头部使用特定标签进行局部设置。
1300

被折叠的 条评论
为什么被折叠?



