随笔 - 6  文章 - 129  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(14)

随笔档案(6)

文章分类(467)

文章档案(423)

相册

收藏夹(18)

JAVA

搜索

  •  

积分与排名

  • 积分 - 814916
  • 排名 - 49

最新评论

阅读排行榜

评论排行榜

@import url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);


这个问题是因为outputstream输出中文字造成的.换成Writer就好了。outputstream是以字节为单位输出字符串的,需要符合那个ISO 8859-1编码

response.setContentType("text/html;charset=UTF-8");
//response.getOutputStream().print("中文字"); //这行会出错
response.getWriter().print("中文字"); //换成这个就好了
response.getWriter().close();




posted on 2011-12-21 15:26 Ke 阅读(1235) 评论(0)  编辑  收藏 所属分类: exception

只有注册用户登录后才能发表评论。


网站导航: