tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McGuire, Normand" <>
Subject JSPC throws NPE (NullPointerException) when compiling JSP that us e tag library reference -- a workaround and a fix
Date Fri, 10 Jan 2003 18:22:34 GMT
Recently, many people posted messages about JSPC throwing a NPE when
compiling seemingly simple JSP, to which there was no reply. I've had that
problem myself, with many different versions of Tomcat. Fortunately, the
problem made it to the developers' mailing list and has been fixed.
Unfortunately, it does not seem that the fix, published on Nov 13, 2002, has
been applied to version 4.1.18 on Dec 18, 2002.

I found one work around in Tomcat's user's mailing list (thanks to Kris
Schneider) and one fix in Tomcat's developer's mailing list (thanks to
Petteri Stenius).

The workaround involves modifying all your JSP pages that refers to tag
libraries and the web.xml file. I have tried it and I got JSPC to work. The
fix involves modification to one source file of Tomcat, for those
interested. I did not try that one (yet).

The workaround can be found in:

The most important part is:

	Modify the uri attribute of the taglib directive in JSP:

	<%@ taglib prefix="c" uri="/tlds/jstl/core" %>

	Add a taglib element to web.xml:


	Extract TLD from taglib JAR and place in /WEB-INF/tlds.

By "Extract", it means the TLD *must* be removed from the JAR.

The fix can be found in:

Normand McGuire <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message