jsp编码的设置:
1. jsp页面编码: jsp文件本身的编码
pageEncoding:<%@ page pageEncoding="UTF-8"%>
2. web页面显示编码:jsp的输出流在浏览器中显示的编码
contentType: <%@ page contentType="text/html; charset=UTF-8"%>
3. html页面charset:
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
web页面输入编码: 输入框输入的字体编码
4. web服务器输入的请求流: web Server相应浏览器的请求数据
setCharacterEncoding:request.setCharacterEncoding(),response.setCharacterEncoding()
5 .web服务器输出的响应流: web Server相应浏览器的输出数据
setContentType:response.setContentType()
以上就是jsp怎么设置编码?的详细内容,
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)