Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
titletutorial/package.properties
borderStylesolid
requiredstring = $\{getText(fieldName)} is required.
password = Password
username = User Name

We also need to make changes to the validator and Logon page. As you see a value in resource bundle can also be specified as an expression.

Logon-validation.xml

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

...

Code Block
titletutorial/package.properties
borderStylesolid
# ... 
HelloWorld.message = Struts is up and running ...
Missing.message = This feature is under construction. Please try again in the next interationiteration.

This will work for HelloWorld since it is already in the tutorial package. But it won't work for the default Missing action, unless we add our own base class for the tutorial package.

...

(minus) This feature is under construction. Please try again in the next interationiteration.
(plus) <s:text name="Missing.message"/>

...

Code Block
formatJava
titleHelloWorld.java
borderStylesolid
package tutorial;

public class HelloWorld extends ExampleSupportTutorialSupport {

    public static final String MESSAGE = "HelloWorld.message";

    public String execute() throws Exception {
        setMessage(getText(MESSAGE));
        return SUCCESS;
    }

  // ... 
}

...