怎样设置Myeclipse的jsp页面为默认utf-8编码

如题所述

启动MyEclipse,点击菜单上的window--->preferences
在弹出的对话框中点击MyEclise--->Files and Editors--->JSP
就可以看到JSP编码设置面板
在Encoding那个下拉框选择UTF-8编码
温馨提示:内容为网友见解,仅供参考
第1个回答  2015-12-20
Myeclipse设置jsp页面的编码是通过page指令实现的。
1. pageEncoding:<%@ page pageEncoding="UTF-8"%>
jsp页面编码: jsp文件本身的编码

2. contentType: <%@ page contentType="text/html; charset=UTF-8"%>
web页面显示编码:jsp的输出流在浏览器中显示的编码

3. html页面charset:<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
web页面输入编码: 输入框输入的字体编码

4. setCharacterEncoding:request.setCharacterEncoding(),response.setCharacterEncoding()
web服务器输入的请求流: web Server相应浏览器的请求数据
相似回答