Internationalization in Struts framework dealing with 中文 乱码问题

Please check out the points as follow:

  • Use struts framework
  • IE browser  (recommend)
  • Every jsp must  has the code:

 

<% @ page language = " java "   pageEncoding = " UTF-8 " %>

 

  • Struct-config.xml with the code:
    < message-resources  parameter ="ApplicationResources"   />
    File ApplicatinResources.properties is under WebRoot/WEB-INF/classes path! (YOU CAN CHANGE IT.)
  • IE browser must setup only  one language ( e.g. [zh_cn] )
  • If you want to debug more than two languages in your page display , you should change the language,be sure to  leave only one language  alone in the IE language option,delete the others,and then restart the IE browser .
  • You must prepare several ApplicationResources_××_××.properties for the internationlization! Which ApplicationResources.properties is taking effect depends on the language setting in the IE browser.
  • If  you want to display Chinese in jsp,you should encode the ApplicationResources_zh_××.properties with the "Unicode"! You can use tool native2ascii.exe to convert them. (native2ascii.exe is under JDK INSTALL path.)

相关文章: http://blog.csdn.net/drean725/archive/2007/04/20/1573259.aspx

GOOD LUCK!

你可能感兴趣的:(jsp,struts,IE,delete,browser)