you should have this code in your pages :
<head>
<META http-equiv="Content-Language" content="fa">
<META http-equiv="Content-Type" content="text/html;
charset=utf-8">
</head>
and in your MySQl's my.ini file in [mysqld] section ,
you should have :
default-character-set=utf8
or you can set utf8 encoding in your sql code.
then in your hibernate configuration file you should
have the properties :
useUnicode=true
characterEncoding=UTF-8
then insert an init param in your web.xml <servlet>
tag
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
and save your pages in utf-8 format.
this will work well , but if you have a form that have
file upload and you are using a multipart form , your
unicode data will loose , and you should seperate your
form into two section , in one section get unicode
data and in one section upload your files.