Hi, Is there any way of checking a Boolean value(instead of a boolean value) in <logic:equal> I am getting a Boolean value back from the database and i want to check it in the jsp without writing code in the action.
Extract from Struts Logic Tags Documentataion For tags that do value comparisons (equal, greaterEqual, greaterThan, lessEqual, lessThan, notEqual), the following rules apply: - The specified value is examined. If it can be converted successfully to a double or a long, it is assumed that the ultimate comparison will be numeric (either floating point or integer). Otherwise, a String comparison will be performed. - The variable to be compared to is retrieved, based on the selector attribute(s) (cookie, header, name, parameter, property) present on this tag. It will be converted to the appropriate type for the comparison, as determined above. - If the specified variable or property returns null, it will be coerced to a zero-length string before the comparison occurs.
I don't think it matters if you are getting back a boolean or Boolean value. The comparison that will be performed will be a String comparison in your case.
Something like this should work. <logic:equal name="someForm" property="someBooleanValue" value="true" /> The case of "true" would matter in this example.
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
a bit of art, as a gift, the permaculture playing cards