为什么我从jsp页面上的数据到action都是乱码呢?userName = new String(userName.getBytes( "ISO8859_1 "), "utf8 "); 不管用我的jsp,和action中都有utf-8的声明啊!
解决方案 »
- 如何控制一个文本输入框只能输入整数,不能输入其他字符
- 如何通过函数来播放背景音乐?
- 保存多个登录用户!!
- $(document) 提示 Error: Object doesn't support this property or method 都有什么可能呢?
- 我从数据库表中取得数据,想在页面以<DIV>格式生成列表,那这个DIV是用JAVASCRIPT动态生成的吗?
- javascript获取表单参数拉!~!!~!~~!~!
- (1)showModelessDialog如何在子窗口设置父窗口的超链接的onclick事件?子窗口指定父窗口的超链接的onclick事件,关闭子窗口后,点击父窗
- 如何动态删除指定的超连接?
- 哥们,如何把onclick打开windows.open的窗口放在目标框架里面去?
- 请问在局域网内如何实现判断flash插件是否存在,如果没有如何实现自动安装
- 我想找个mvc架构下的jquery操作表格的例子
- ExtJs 3.0
request.setCharacterEncoding("utf-8");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
response.setCharacterEncoding("utf-8");在action方法最上面写上这个~·
<filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
response.setContentType("text/html;charset=utf-8");请求通过的地方都加上。