chethan narayana

Greenhorn
+ Follow
since Jul 17, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by chethan narayana

Kudos it helped to resolve the issue of loading property file
thanks a ton

Tommy Delson wrote:

srinivas Doni wrote:Hi to all,


I am getting error
ResourceBundle [/WEB-INF/messageresource/welcome] not found for MessageSource: Can't find bundle for base name /WEB-INF/messageresource/welcome, locale en. Even though i put in source path, it is not recognizing the messageresource in spring.

if any one knows, help me to fix this error.


Thanks inadvance,

With Regards,
srini






After reviewing the error message I can tell that your bean "messageSource" is not probably configured.

Here a solution based on your configuration.

What you have: <property name="basename" value="/messageresource/welcome"/>

Problem: The problem is where you specified the value contents ""/messageresource/welcome" incorrectly, therefore, it can't find your property file.

Solution: Change to "<property name="basename" value="/WEB-INF/messages/messages" />" based on your configuration.

Your welcome.properties file must place in "/WEB-INF/messageresource/" directory in your webapp. The "welcome" is just a properties name or whatever you called follow after the directory.



Example,



Refer to Spring reference document if you need for info...hope it help.




9 years ago