我在Struts 2中有一个操作,我想在JSP中测试电子邮件ID是否为空或null
使用<s:if>
测试条件。
class EmailAction extends ActionSupport {
private ArrayList<Email> emailList;
//setter and getters
}
class Email {
private String username;
Private String password;
private String emailId;
//getters and setters
}
答案 0 :(得分:0)
你应该为emailId
<s:if test="emailId == null || emailId == ''">