Adding a method named getGreeting creates a greeting property for user. Since there is no setGreeting method this property is read-only.
public String getGreeting() { if (name.length() == 0) return ""; else return "Welcome to JSF2 + Ajax, " + name + "!"; }