Message Bundles
Answer=Your Answer:
You can declare a message bundle in two ways.
Message Bundle File
1. Way-1 faces-config.xml
In JSF File (xhtml)
2. Way-2 Global resource bundle declaration
- When you implement a web application, it is a good idea to collect all message strings in a central location.
- This process makes it easier to keep messages consistent.
- You collect your message strings in a file:
- Exa:
Answer=Your Answer:
- Save the file together with your classes.
- You can choose any directory path and filename but you must use the extension .properties.
- Exa: messages.properties
You can declare a message bundle in two ways.
- Way-1 faces-config.xml
- Way-2 Global resource bundle declaration
Message Bundle File
- The collection of all message strings in a central location
1. Way-1 faces-config.xml
In JSF File (xhtml)
2. Way-2 Global resource bundle declaration
Tags:
Java