Java-based template engine