jstl tags not working in jsf 2

I was migrating a JSF application to JSF 2 and noticed that none of the JSTL tags worked anymore.  And Googling for a reason for that hasn’t been very helpful as 99% of the posts regarding “JSTL and JSF” just say “don’t”. 

The prevailing wisdom used to be that you shouldn’t mix JSTL and JSF, and once upon a time that was very true.  But JSF and JSTL has worked pretty well together since at least 1.2, and while in general you should avoid JSTL when there’s an equivalent purely JSF-based solution, there are times when it just makes more sense to use JSTL.  So I was disappointed at first to see that this didn’t appear to be working anymore.

Well, it turns out, JSF 2’s Facelets specification requires support for JSTL and both major implementations includes the taglib.xml so we’re good.  There’s no reason to rewrite all those .xhtml files just yet.

It turns out the problem was simply that the taglib namespace had changed from

      xmlns:c=”http://java.sun.com/jstl/core”

to

      xmlns:c=”http://java.sun.com/jsp/jstl/core”

I couldn’t find documentation anywhere about that, so here you go, Googlers.  Hopefully I saved a few of you a couple of headscratching minutes.