Book Image

Tapestry 5: Building Web Applications

Book Image

Tapestry 5: Building Web Applications

Overview of this book

Table of Contents (17 chapters)
Tapestry 5
Credits
About the Author
About the Reviewers
Preface
Foreword
Where to Go Next

Creating and Using Message Catalogs


Just to remind you—a application-wide, or root, message catalog should be placed into the WEB-INF directory. Its extension should be properties, and its name should be the same as the name of Tapestry filter defined in the deployment descriptor web.xml—hence app.properties in our case. Here is the content of this file accumulated throughout the previous chapters:

Country.GERMANY=Germany
country.uk=United Kingdom
COUNTRY.USA=United States
dateOfBirth-label=Birth Date
email-regexp=^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+
([a-zA-Z0-9]{2,4})+$
email-regexp-message=Email address is not valid.
age-min-message=You are too young! You should be at least %s years
old.
age-max-message=People do not live that long!
passwords-dont-match=Two versions of password do not match.
authentication-failed=We couldn't authenticate you. Try again or
register.
firstName-required-message=You cannot have a celebrity without a
name!

If we look through the entries, we shall realize...