Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed typo.

...

The framework associates message resources to classes. To add a message resource for the Login Logon action, we could just name the resource LoginLogon.properties and set it on the classpath next to the Login Logon Action.

But, most people find it counter-productive to use separate message resource bundles for each class. Instead, many people prefer to add a bundle for an entire package of classes. To do this, simply add a package.properties file to the package. In our case, it would be the tutorial package.

...

We also need to make changes to the validator and Login Logon page.

...

Logon-validation.xml

(minus) <message>Username is required</message>
(plus) <message key="requiredstring"/>

(minus) <message>Password is required</message>
(plus) <message key="requiredstring"/>

...

Logon.jsp

(minus) <s:textfield label="User Name" name="username"/>
(plus) <s:textfield label="%{getText('username')}" name="username"/>

...