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

...

Tags: , , , , ,

Monday, April 16th, 2012 JSP, Programming

Leave a Reply

 
Comments are moderated due to spammers. Your comments will not appear until I review and approve them. If you left a question I will answer as best I can so be sure to check back.