Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

ApplicationResources is not being read

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Thanks, the file was having an extra space in the front.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic