File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use struts's ApplicationResources file?

 
Sean Li
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
franci
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic