Share on Google+Share on Google+

Creating a properties file

This file is used for the purpose of storing some key and value pairs for the application.

Creating a Properties File


This file is used for the purpose of storing some key and value pairs for the application. Its key are used in the application and those are replaced with the value of the key. The other benefit of using this file is that we can change the value of the key if required which will change the message accordingly without changing any code in the application. Our login and registration application uses the properties file named "LRAppResourceBundle".

errorFirstName=Only [a-z][A-Z] characters allowed
errorFirstNameLength=Last Name must be of 1-25 characters
errorLastName=Only [a-z][A-Z] characters allowed
errorLastNameLength=Last Name must be of 1-25 characters
errorUserNameBlank=User Name cannot be blank
errorUserNameLength=User Name must be of 6-20 characters
errorUserName=Only (.) special symbol is allowed
errorValidUserName=User is already registered
errorPasswordLength=Password must be of 6-20 characters
errorPassword= Only alphanemeric characters allowed
errorConfirmPasswordLength=Password must be of 6-20 characters
errorConfirmPasswordValid= Only alphanemeric characters allowed
errorConfirmPassword=Please enter confirm password correct
errorEmail=Invalid Email Address
errorValidEmail=Email is already registered
errorAddressBlank=Address cannot be blank
errorCountryBlank=Country cannot be blank
errorStateBlank=State cannot be blank
errorContactNumberBlank=Contact Number cannot be blank
errorPasswordConfirm=Please enter confirm password correct
errorEmailMsg=Email Address cannot be blank



Posted on: June 24, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Creating a properties file  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image