• 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

my code is not accessing the application.properties file

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hiii,


i am getting an error which says

javax.servlet.ServletException: Missing message for key "inputForm.userName"


can any one tell me y?
 
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
not sure your case is similar to https://coderanch.com/t/55466/Struts/Cannot-find-message-resources

i think if you post your code here would be useful for all of us to tackle your problem

here i will have quick scan whether i will miss out some steps as below :

1) is the messageresources.property file in \web-inf\classes ?

2) do you put the key into resource file ?

3) do you put the right name for property file ? example if you code as below


then you should have PagesResources.property in related folder .


hope this informtion can be useful
 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you just explain what that bundle does .I am not clear about it
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when you have a resource property file and want to refer it , you need to add a bundle attribute in order to point and get the key from correct property file

say for example , you have a resource property named "PagesResource.property" , then you need bundle="pages" for this case

is it make sense to you ?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have only one message resource bundle, it is not necessary to use the bundle attribute of the <bean:message> tag.

Ninety-nine percent of the time when you get a message like

Missing message for key "inputForm.userName"


The problem is that you've either forgotten to include a message key with this name or you've misspelled it.
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,


javax.servlet.ServletException: Missing message for key "inputForm.userName"



it means you getting the resources file but unable to find the exact key matching "inputForm.userName" with value in resources file. check out your resources file having the same key "inputForm.userName" with value???

milan.
[ January 19, 2007: Message edited by: Milan Jagatiya ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic