aspose file tools*
The moose likes Struts and the fly likes how to use struts's ApplicationResources file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to use struts Watch "how to use struts New topic
Author

how to use struts's ApplicationResources file?

Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
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

Joined: Aug 30, 2002
Posts: 3
try using unicode strings for u'r chinese characters. the rest of the parameters are correct
Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
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?
 
Consider Paul's rocket mass heater.
 
subject: how to use struts's ApplicationResources file?
 
Similar Threads
A Struts Internationalization Example Problem
what is applicationResources. properties
JspException: Missing message for key index.title
Missing message for key index.title
help on taglib and properties file in struts?