The JSTL tags as proposed in the other answer are not necessary and it is not nicely reuseable.
Here's a basic example using pure JSF (assuming that you runs Servlet 3.0 / EL 2.2, otherwise you indeed need to use
like as in your question):
with
private String page;
@PostConstruct
public void init() {
this.page = "page1"; // Ensure that default is been set.
}
// Getter + setter.