Can we compare a local variable(not from bean) value in <logic:equal> tag ??

Code:
<%
String isEnrolled = "N";
%>
<logic:equal name ="isEnrolled" value="N">
Inside logic equal
</logic:equal>

When I execute the above code, its not entering inside logic equal. I tried to print the value of isEnrolled,its "N" only, I dont know why its not entering.

Please help me in this regard...

Thanks in advance