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

  • 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.
1 Solution

// Using jstl tag
<c:forEach var="row" items="${myActionForm.myMap}">
    <c:if test="${row.value}"><c:out value="${row.key}"/> is true.</c:if>
// 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.

Open in new window


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