Spring中关于乱码的解决办法

Posted by eDWARD at 15:22

Spring可以在容器加载时在web.xml中配置filter来进行转发过滤,因为我把html作为screen的映射后缀,所以这里可以根据你的情况设置为*.jsp或*.action等等。

如果你用到了任何properties配置文件,那么就需要通过java/bin/native2ascii统一转码为utf-8编码方式

所有被渲染的view层的页面顶部增加下面的代码

Sphere: Related Content

Filed In 学习路上 | Study | Tags: , , |

Your Comments.

Leave your own response

Leave a Reply.

Comment Form.

Fields denoted with a "*" are required. Your comment may require moderation, please be patient.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Your Reply.

Use the following link to trackback from your own site:
http://www.zhangzhang.net/articles/2006/12/28/spring-charset/trackback/

Spread the word.

Octopus supports RSS feed for this post RSS 2.0 , and Trackbacks from other blogs.


Technorati

  品位不凡,威严,略显高深,喜爱一切美丽的事物,易怒,固执,有些利己,但关心接近他的人。谦逊,但非常有野心,有才能,刻苦,是不甚令人满意的伴侣,朋友众多,树敌也多,是可以信赖的人。


bloglines
google reader
my yahoo