I found the answer. I need to access it using pageContext
. So instead of calling it like so,
<c:if test="${custom:isVisitorFromNorthAmerica(request)}">
I need to call it like so,
<c:if test="${custom:isVisitorFromNorthAmerica(pageContext.request)}">