• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bean:message - existing key value not found

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am learning struts 1.0.2 with Apache 4.1.18.
In my webapp's web.xml I specified a resource properties file. This property file contains an index.title entry yet when I try to run the app in my IE browser I get a Http 500 error with the JasperException message "Missing message for key index.title"
While debugging I discoved that if I put an non-existant property file in my web.xml the Apache log still reports that the "application resources were loaded using" the non-existant property file. My property file is under yhe WEB-INF/classes/mypackage directory. Is this correct?
Can you suggest another area to investigate (I'm sure I don't have a typo).
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your web.xml says something like:
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
then your app will be looking for ApplicationResources.properties in "WEB-INF\classes".
HTH
 
Rich Smyth
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I placed my source code in the default package. My web.xml specifies the resource property file as you described and my property file is in WEB-INF/classes. Still I have no luck finding my key value.
I inserted the <logic:notPresent> tag to test that my resources were in fact loaded ( tag code taken from the struts-example) and the test did not detect an error.
I could really use a tip on what I could test next to resolve this.
Rich
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can we see the code in your jsp as well as your properties file?
 
Rich Smyth
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My jsp, property file, and web.xml are posted below(I hope the formatting comes out ok):
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Try removing ".properties" from the end of "RegisterUserResources" in the above code.
Also, this is probably just a typo, and if you are running on a Windows platform it might not even matter (not sure to be honest), but in part of the code you showed you referenced a "registerUserResources.properties" however your web.xml refers to "RegisterUserResources" with a capital "R".
[ January 13, 2003: Message edited by: Jason Menard ]
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I may be wrong on this, but I believe the resource bundle is case sensitive. Check to make sure that the init-param in the web.xml file matches the case of the file name.
 
Rich Smyth
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Jason!
I had to remove the .properties from the 'application' <param-value> in my web.xml
I will not forget this errorl. (nor will I have complete faith in tutorials on the web
)
reply
    Bookmark Topic Watch Topic
  • New Topic