Posts Tagged ‘java’

Show Chinese characters on JSP pages using property files in web application

Friday, February 4th, 2011

Below is procedure to show Chinese characters on JSP pages using property files in web application.

  1. Create new property file for Chinese language of extension _zh.properties like ABC_zh.properties.
  2. Open the newly created property file in UTF-8 enabled editor like notepad or Edit+.
  3. Put the relevant key values in Chinese language. Like. customer.number=客户号码
  4. After setting all key values in property file, save file as encoding as UTF-8.
  5. Use tool native2ascii from JDK bin directory to convert Chinese characters to Unicode using following command by ensuring the encoding to UTF-8.
  6. Convert native to ASCII using following command:
    $JAVA_JOMEbin>native2ascii.exe -encoding UTF-8 ABC_zh.properties ABC_zh_1.properties
  7. Copy newly created ABC_zh_1.properties to original location of property files and renamed to ABC_zh.properties
  8. Add the following line in starting the weblogic server like


  9. Add following java options:
    set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% - Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag% -Dfile.encoding=UTF-8
  10. Add the content type as UTF-8 in displaying JSP pages by adding following line at start of JSP file.
  11. Thats It !!!

For installing Weblogic 10.3 on Snow Leopard

Saturday, June 5th, 2010

Hack to validate JVM while installing Weblogic 10.3 on Snow Leopard:

cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/sudo mkdir jre
cd jresudo ln -s ../lib libsudo ln -s ../bin bin
  • © 2004-2015 Special Work & Technology Limited