aspose file tools*
The moose likes Struts and the fly likes my code is not  accessing the application.properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "my code is not  accessing the application.properties file" Watch "my code is not  accessing the application.properties file" New topic
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,


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 ]

Milan.<br />I can because I think I can...
 
 
subject: my code is not accessing the application.properties file
 
Similar Threads
head first servlets and jsp pdf
Merrill Lynch Or Lehman Brothers
Kid in a bag
India Australia cricket
Cricket: India vs. West Indies