• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to use struts's ApplicationResources file?

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
first, i don't know where to put this file.
second, i don't know what to write in struts-config.xml to deploy this file.
third, i don't know what to do if i want to use chinese in that file.
what i did was wrote chinese directely into the ApplicationResources.properties file with the format of name=value pairs. and place this file in the WEB-INF/classes/callcenter/web directory. and i add <message-resources parameter="callcenter.web.ApplicationResources"/> to the struts-config.xml. when deployed to weblogic 7. nothing appeared. i saw a line in weblogic runing window:
[INFO]PropertyMessageResources - -Initializing, config='org.apache.struts.taglib.bean.LocalStrings' returnNull=true
I don't know what this sentence means. it's just cannot work. the page stops at the <bean:message title="index.title"/>. but i did write a name value pair in the ApplicationResources.properties file: index.title=*****, "*****" here is in chinese.
can anybody help me? really thanks!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try using unicode strings for u'r chinese characters. the rest of the parameters are correct
 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks! if i use english in my case, all is ok. so my configuration and ApplicationResource.properties files are all ok. the only question left is how to deal with chinese. i saw a example shipped with struts 1.1 b2. it contains a ApplicationResource_jp.properties. and i looked into it. I saw no japanese code but all unicodes. i think that must be very boring to transfer japanese to unicode one by one. is there any tools?
 
reply
    Bookmark Topic Watch Topic
  • New Topic