Sample Application: Resource File

 

ApplicationResource.properties, can be used to define all the error message for your input validations like, errors.length.fieldname=<font color="red">{0} - user name must be less than 25 characters </font> Internationalization is one advantage using properties files. You can build an application which is not restricted to a particular language (like English , Japanese , Hindi ).

http://yourdomain.com/constants/ApplicationResource.properties

 
#------Property file storing mesaages to be displayed on the web page------------#
# -- welcome --
welcome.title=Welcome to Sample JSP page
welcome.heading=Welcome!
welcome.content=This string is from the properties files.
The file can also be used for language support.
 

ApplicationResource.properties stores the messages for users.

[Page 1] [Page 2] [Page 3]

 
 
Contact Us