JSTL taglib not recognised in JSF module

I am doing my first Java EE project in general and in IntelliJ (8) in particular, and I have enjoyed most of the lessons learned so far. It is however not my first project with working with Java Server Pages, so I figured this part would be easy going. So although this might be a complete noob mistake, I have spend a few hours trying to figure it out, and use this as my last resort.

The problem is very simple. When I use:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


IntelliJ is unable to resolve the taglib.

Now, my first guess was that I were missing a JAR or something.
But as the module has JSF 1.2 support, the jstl.jar is right beside the JSF jars. And the JSF taglibs resolves perfectly and so does my own.

What am I missing?

Best regards,
Thomas

2 comments
Comment actions Permalink

Hi Thomas,

I would simply say that the downloaded jstl.jar is corrupt or incomplete. If you have a look inside there are only a few classes, and the TLD's are missing. Finally, the size is only about 20 KB whereas the jstl.jar that is bundled with the Java EE SDK is about 380 KB.

Just replace the downloaded library with a correct one and everything should work.

Regards,
Stephan

0
Comment actions Permalink

Thanks Stephan,

That was sufficient information to make me able to solve the problem.
It turns out, that jstl.jar on its own is pretty useless. You really want to accompany it with standard.jar from Apache, which is the archive which among lots of other thing contains the TLDs.

It would be nice, if IntelliJ were clever enough to add this to the JSP/JSF support...

Regards,
Thomas

0

Please sign in to leave a comment.