<%--
  Copyright (c) 2003, 2012 Oracle and/or its affiliates. All rights reserved.
  ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--%>

<%@ page contentType="text/plain" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="string1" value="This is first String." />
<c:choose>
    <c:when test="${'This is ' == fn:substringBefore(string1, 'first')}">
        Test PASSED
    </c:when>
    <c:otherwise>
        Test FAILED.  Expected fn:substringBefore(string1, 'first') to return
        'This is'.  Actual return value: ${fn:substringBefore(string1, 'first')}
    </c:otherwise>
</c:choose>