This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2: Localization not working

 
vikas sharmaa
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after going through the Localization site, i created package.properties file in the action directory. contents of package.properties file is:



then, in jsp file, i fetch the mytest.name property as follows:



but, its not displaying the value of mytest.name from the package.properties file. please let me know where am going wrong?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you accessing the JSP directly, or going through an Action? That won't work.

If going through an action, does it either extend ActionSupport or implement its own TextProvider (and LocaleProvider if you need it)? If not, it won't work.

 
vikas sharmaa
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
great newton! i was testing localisation on my welcome file that was not going through action. now, i tried the same in another jsp that was coming from an action class and it works! thanks a lot!!!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic