0

I have an action in Struts 2, I want to test whether email ID is empty or null using <s:if> test condition in JSP.

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
}
Roman C
  • 49,761
  • 33
  • 66
  • 176

1 Answers1

0

You should provide getter for emailId

<s:if test="emailId == null || emailId == ''">
Roman C
  • 49,761
  • 33
  • 66
  • 176