JSP error: [method] must be used with a prefix when a default namespace is not specified

So, in a JSP I needed to compare two strings so I tried something like this:


...

This of course was followed by the following error:

JSP error: equalsIgnoreCase must be used with a prefix when a default namespace is not specified

Silly me… you can’t do that in a JSP like that. But you can use the function (fn) expression language tag library with some common function implementations. So, the above becomes this:

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
...

...
Category(s): JSP, Programming
Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *