Search code examples
javastrutsstruts-1

Struts logic tag with session variables


Following code prints 0 values in the table column. But it is not supposed to print since in the logic equal it checks whether the value is 1.

<logic:equal name="humpRoadFlag" value="1" scope="session">
           <td title='<bean:message key="prompt.block_to" />'><%= session.getAttribute("humpRoadFlag") %></td>

</logic:equal>

Any idea?


Solution

  • This should be included in the jsp page.

     <%@ taglib uri="/WEB-INF/taglib/struts-logic.tld"     prefix="logic" %>