Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1003
  • Last Modified:

Display in jsp structs using boolean value

My requirement is to display some message based on the bollean value ( which is in in map ) in jsp
 I am working on struts.
can anybody please provide me the code.
0
toharikr
Asked:
toharikr
1 Solution
 
boonlengCommented:

// Using jstl tag
<c:forEach var="row" items="${myActionForm.myMap}">
    <c:if test="${row.value}"><c:out value="${row.key}"/> is true.</c:if>
</c:forEach>
 
// Using struts tag
<logic:iterate id="row" name="myActionForm" property="myMap">
    <logic:equal name="row" property="value" value="true">
        <bean:write name="row" property="key"/> is true.
    </logic:equal>
</logic:iterate>

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now