You must explicitly include it as an argument in a method that implements your EL function.
Java method that implements the EL function:
public static Object findAttribute(String name, PageContext context) { return context.findAttribute(name); }
TLD entry for EL function:
<function> <name>findAttribute</name> <function-class>kschneid.Functions</function-class> <function-signature>java.lang.Object findAttribute(java.lang.String, javax.servlet.jsp.PageContext)</function-signature> </function>
Usage in JSP:
<%@ taglib prefix="kfn" uri="http://kschneid.com/jsp/functions" %> ... <c:if test="${empty kfn:findAttribute('userId', pageContext)}">...</c:if>
kschneid
source share