Just Thinking

Fourth Woods Blog

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

Posted on 16 April, 2012  in JSP, Programming

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" %>
...

...

, , , , ,

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

Leave a Reply

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