https://stackoverflow.com/questions/1490139/evaluate-list-contains-string-in-jstl?noredirect=1&lq=1
<jsp:directive.include file="../fragments/mason-init.jspf"/>
<m:resource>
<m:request method="GET" item="false">
<c:if test="${mtgReq.params['authType'] eq 'normal'}">
<sql:query var="user" dataSource="${datasource}">SELECT * FROM account WHERE email=?
<sql:param value="${mtgReq.params['email']}"/>
</sql:query>
<c:set target="${output}" property="user" value="${pageScope['user']}"/>
</c:if>
<c:if test="${mtgReq.params['authType'] eq 'google'}">
<sql:query var="googleUser" dataSource="${datasource}">SELECT * FROM account WHERE email=?
<sql:param value="${mtgReq.params['email']}"/>
</sql:query>
<c:set target="${output}" property="googleUser" value="${pageScope['googleUser']}"/>
</c:if>
</m:request>
</m:resource>
Instead of above it should be
<jsp:directive.include file="../fragments/mason-init.jspf"/>
<m:resource>
<m:request method="GET" item="false">
<c:if test="${m:listContains(m:list("google","facebook", "twitter","linkedin"), mtgReq.params['authType'])}">
<sql:query var="googleUser" dataSource="${datasource}">SELECT * FROM account WHERE email=?
<sql:param value="${mtgReq.params['email']}"/>
</sql:query>
<c:set target="${output}" property="user" value="${pageScope['user']}"/>
</c:if>
</m:request>
</m:resource>
The existing function jstl can be copied and new functions can be created under the same tld
https://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/fn/tld-summary.html
With the issue fixes, it can be released as mason 5.
https://stackoverflow.com/questions/1490139/evaluate-list-contains-string-in-jstl?noredirect=1&lq=1
Instead of above it should be
The existing function jstl can be copied and new functions can be created under the same tld
https://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/fn/tld-summary.html
With the issue fixes, it can be released as mason 5.