Java

JSTL Stopped Working?

I’ve been using Jakarta Taglib’s implementation of JSTL for a while now. As I work to move some of my apps up to more recent versions of libraries and J2EE, I beat my head on the wall for a few hours chasing down a nasty problem.

I upgraded the Jakarta Taglib JSTL to the latest version, 1.1.2. Suddenly, many of my JSTL tags stop interpreting the dynamically specified values, such as on a c:forEach items=”${forms}”. I check the docs, and upgraded my XML libraries to the recommended versions. Still broken. I try some non-taglib expression language outputs – it just prints the literal, not the interpreted expression.

The trick? My web.xml still specified that it was a servlet 2.3 webapp. Upgrading the descriptor to the [verbose] 2.4 indicator fixed all the problems. Now to get rid of all of those c:out tags!

Advertisements