Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSTL Illegal text inside "c:choose" tag: "<!-- ..."

Tags:

jstl

<c:choose>
    <c:when test="${somecondition}">
      ...
    </c:when>
    <!-- if not somecondition do otherwise -->
    <c:otherwise>
      ...
    </c:otherwise>
</c:choose>

The above code will throw a jspError, "JSTL Illegal text inside "c:choose" tag: "

like image 212
eodgooch Avatar asked Jan 23 '13 19:01

eodgooch


1 Answers

<c:choose>
    <c:when test="${somecondition}">
      ...
    </c:when>
    <%-- if not somecondition do otherwise --%>
    <c:otherwise>
      ...
    </c:otherwise>
</c:choose>

You can't use < !-- --> comments. Thought I would share since I didn't see this on stackoverflow and ran into it today.

http://youtrack.jetbrains.com/issue/IDEA-44363

like image 102
eodgooch Avatar answered Nov 06 '22 03:11

eodgooch