Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is the use of <logic:equal/> and <logic:notEqual/> tag defined by Logic tag library in Struts framework?
The <logic:equal/> tag evaluates its body if the variable specified by any one of the attributes cookie, header, name, property, parameter equals the constant value specified by the value attribute. The <logic:equal/> tag has a body of JSP and supports seven attributes:
value, cookie, header, name, property, parameter, scope.
Example:
<logic:equal name="user"
  property="age"
  value="<%= requiredAge %>">
  You are exactly at the right age.
</logic:equal>

The <logic:notEqual/> tag evaluates its body if the variable specified by any one of the attributes cookie, header, name, property, parameter is not equal to the constant value specified by the value attribute. The <logic:equal/> tag has a body of JSP and supports seven attributes:
value, cookie, header, name, property, parameter, scope.
Example:
<logic:notEqual name="user"
  property="age"
  value="<%= requiredAge %>">
  You are not at the right age.
</logic:equal>