This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 tags and locale property files

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wondering if someone could shine a little light on why my _CH property file with the following line:-

works with the folowing tag:

Displaying 请输入密码
But with this tag:

I just get ???

Not too important I can just use the first example, but the s:text is a little shorter and neater if you're filling your whole page with tags.
 
jatan bhavsar
Ranch Hand
Posts: 299
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kevin,

Struts is a frame work and there is method gettext() in actionsupport class.so when you are using property tag you need to retrieve values based on key .So you are passing key in the get text method based on which values are retrieved.

http://struts.apache.org/2.0.6/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html

Regards
Jatan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic