解决Extjs传参数到后台中文乱码

中文乱码是程序员经常会遇到的一个问题,在写一个web项目时,前端采用了ExtJs的框架写的。遇到了中文传参时乱码。下面把解决的方法记录下:

String postType = new String(request.getParameter("postType").getBytes("iso-8859-1"),"utf-8");


避免下次出错忘了哦!!!!


猜你喜欢

转载自blog.csdn.net/My_Jack/article/details/79063561