Using Properties in JSPs
Resource bundles are accessible from JSP pages. Here
is the full basketball login page
login.jsp.
- Several Struts tags in this page (bean:message and html:img)
refer to properties in the resource bundle file:
- title.login
- label.username
- label.password
- image.logo
- image.logo.alt
- image.strutspower
- image.strutspower.alt
- Struts knows where to find these properties through the message-resources element in
struts-config.xml
- Here is the
message-resources
element from that file
- Struts finds the properties in the file
BballMessageResources.properties located at WEB-INF/classes