request.getParameter() 获取中文乱码
2015-06-02 19:22
405 查看
1.request.getParameter()
获取中文乱码_,这个时候你在servlet 里面加上一个编码的方式就可以解决了。
就是这一句request.setCharacterEncoding("utf-8");
2.是在 C:\Users\Administrator\Workspaces\MyEclipse 8.5\.metadata\.me_tcat\conf\server.xml 修改成这样就可以了
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" userBodyEncodingForURI="true" URIEncoding="UTF-8" />
相关文章推荐
- 循环结构中break、continue、return和exit的区别
- UIViewContentMode
- 猫猫学IOS(一)UI之Hello World与加法计算器
- hdu2227---Find the nondecreasing subsequences(dp+树状数组)
- HDU 大数模板之Children’s Queue
- UIDevice 设备信息
- UILabel 行间距
- UIImage在拍照上传到服务器时,图片发生旋转解决方案
- xcode 中 UILable 使用方法简介
- quintic蓝牙芯片广播中添加MAC地址的方法
- 程序员的量化交易之路(12)--Guice库的学习
- requestWindowFeature(); 的应用
- Android Volley完全解析(三),定制自己的Request
- iOS学习(3)——UIImageView
- Solr之functionQuery(函数查询)
- 长时间停留在calculating requirements and dependencies 的解决方案
- [SSMS][Visual Studio] 解決 - Unable to find the requested .Net Framework Data Provider. It may not be installed
- 如何让程序员更容易的开发Web界面?重构SmartAdmin展示TinyUI
- FFmpeg building for iOS 8.3
- KQUEUE FreeBSD