• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

ApplicationResources is not being read

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to Struts 2 and am trying to execute the tutorial in the below link.
http://java.dzone.com/articles/struts2-tutorial-part-27

Everything works fine, but the labels given in ApplicationResources.properties are not being picked, so the page loads with text boxes and buttons with no label text. Dont see any errors in the tomcat console. I have the tutorial line by line, double checked for typos and the entry in struts.xml

<constant name="struts.custom.i18n.resources" value="ApplicationResources" />

Any ideas what I am missing ?

Cheers,
Ram
 
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with so little to go off of, I would guess than maybe your resources src file is not getting deployed to the classes directory of the WAR. To do a sanity check just put the struts.xml and that resources file in the src directory and try again. That would be my only guess. You can also turn on trace to make sure those resources got loaded.
 
Ram Murthy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, the file was having an extra space in the front.
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic