| Author |
my code is not accessing the application.properties file
|
Anil Verghese
Ranch Hand
Joined: Oct 11, 2006
Posts: 155
|
|
hiii, i am getting an error which says javax.servlet.ServletException: Missing message for key "inputForm.userName" can any one tell me y?
|
 |
Nakata kokuyo
Ranch Hand
Joined: Apr 13, 2005
Posts: 437
|
|
not sure your case is similar to http://www.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
Joined: Oct 11, 2006
Posts: 155
|
|
|
can you just explain what that bundle does .I am not clear about it
|
 |
Nakata kokuyo
Ranch Hand
Joined: Apr 13, 2005
Posts: 437
|
|
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 ?
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
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.
|
Merrill
Consultant, Sima Solutions
|
 |
Milan Jagatiya
Ranch Hand
Joined: Jan 01, 2007
Posts: 164
|
|
hi,
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 ]
|
Milan.<br />I can because I think I can...
|
 |
 |
|
|
subject: my code is not accessing the application.properties file
|
|
|