when i use the above jsp i m getting the output like this # Hello xcfvxc # ERROR: Resource key "label.welcome" not found in resource1 bundle # ERROR: Resource key "label.hello" not found in resource2 bundle # hai dffhfgh
1) Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information. You can go back and change your post to add code tags by clicking the .
2) Please take the time to choose the correct forum for your posts. For more information, please read this.
First of all, the parameter you specify in the message-resources stanza of the struts-config.xml file should be absent any language suffix. You therefore need to change your entry to:
Secondly, the resources files need to be in the classpath. Make sure that they get copied from the source folder to the WEB-INF/classes folder when the project is built.
Thirdly, I'm not sure if you just mis-typed them in your post, but when you listed the location of the files, they have a space in the name. Make sure they do not have any spaces in them. (ApplicationResources.properties not Application Resources.properties) [ September 26, 2008: Message edited by: Merrill Higginson ]
I got the answer actually there is no need of placing the resource files in classes folder it is enough if we put it in the source folder,I have got the output after including the property attribute in the <html:messages> tag[/B]
Originally posted by chittapuram sai Prashanthi: there is no need of placing the resource files in classes folder it is enough if we put it in the source folder[/B]
For the sake of anyone else reading this, the above statement is not true. If you're using an IDE such as Eclipse, copying the properties files from the source folder to the classes folder is done automatically, but when the application is deployed, the properties files must be in the classes directory or they won't be found.