This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
First see the example of ApplicationResource.properties : # Sample ResourceBundle properties file errors.header=<h4>Validation Error(s)</h4><ul> errors.footer=</ul><hr>
error.lastName=<li>Enter your last name error.address=<li>Enter your address error.age=<li>Enter your age
The major advantage of this file is if your client says to change the text like in place of 'Enter your last name' to 'Last Name' you need to change at one place and you need not make any changes in the code.Suppose many jsps are using this so one place change will reflect everywhere. But if you hard code 'Enter your last name' on the jsp pages. On all the jsp pages you will have to make changes.