I used displaytag today. It's a good thing. There are some problems with Chinese support. I modified some settings in displaytag. properties, including some Chinese characters, such as the paging. Banner. item_name = record. Garbled characters are displayed. You cannot change the configuration file to displaytag_zh.properties or displaytag_zh_cn.properties. The configuration file cannot be changed to UTF-8 encoding. At the moment, I couldn't find a good solution on the Internet. I had to make a copy. Code , Modify org. displaytag. properties. tableproperties
Private string getproperty (string key)
{
Return this. properties. getproperty (key );
}
Change
Private string getproperty (string key)
{
String S = NULL;
Try {
S = new string (this. properties. getproperty (key). getbytes ("8859_1"), "GBK ");
} Catch (exception e ){
S = NULL;
}
Return S;
}
Compile and try again. The solution is just a bit confusing. Let's join it first.
My environment is Windows Chinese + Sun JDK 1.42 + Tomcat 5.0.28 + displaytag 1.0