写一个 velocity 模版,这个模版可以生成一个 html 页面,输出 $user 中包含的动态用户信息
一个 Java 类 User 的定义如下 :
public class User {
private String name;
private String emailAddress;
private boolean male;
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String address) {
this.emailAddress = address;
}
public boolean isMale() {
return male;
}
public void setMale(boolean male) {
this.male = male;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public User( String name, String emailAddress, boolean male ) {
this.name = name;