J2EE编辑中的中文乱码解决问题
2015-06-27 19:38
531 查看
服务器:Tomcat 6.0
常用解决方法有以下3种:
1、在所有的.jsp文件的首行加上<%@ page contentType="text/html;charset=GBK"%>或者<%@ page language="java" pageEncoding="GBK"%>
2、在 <head> </head>中的首行加上 <meta http-equiv="Content-Type" content="text/html; charset=GBK">,如下:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title></title>
</head>
3、配置Tomcat 6.0\conf\server.xml
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" useBodyEncodingForURI="true"
disableUploadTimeout="true" />
常用解决方法有以下3种:
1、在所有的.jsp文件的首行加上<%@ page contentType="text/html;charset=GBK"%>或者<%@ page language="java" pageEncoding="GBK"%>
2、在 <head> </head>中的首行加上 <meta http-equiv="Content-Type" content="text/html; charset=GBK">,如下:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title></title>
</head>
3、配置Tomcat 6.0\conf\server.xml
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" useBodyEncodingForURI="true"
disableUploadTimeout="true" />
相关文章推荐
- java-模拟tomcat服务器
- i-jetty环境搭配与编译
- 实现单Tomcat多Server配置
- 生产环境下的Tomcat配置
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Orace查询数据出现乱码的问题解决思路
- oracle em 按钮乱码解决办法及em网页变成英文
- C#读取中文文件出现乱码的解决方法
- mysql命令提示行连接乱码的解决
- Jquery乱码的一次解决过程 图解教程
- 解决realplayer11中文正式版网页右键乱码问题embed_cn.dll
- 计算机中的字符串编码、乱码、BOM等问题详解
- php+AJAX传送中文会导致乱码的问题的解决方法
- Discuz!nt 源文件变成乱码的解决方法
- jQuery调用AJAX时Get和post公用的乱码解决方法实例说明
- JavaScript中出现乱码的处理心得
- Js,alert出现乱码问题的解决方法
- 深入Lumisoft.NET组件开发碰到乱码等问题的解决方法
- jquery中文乱码的多种解决方法