File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Taglibs not found problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Taglibs not found problem" Watch "Taglibs not found problem" New topic

Taglibs not found problem

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

I am experiencing a surprising problem with taglibs. So I would like to share with you what I missed.
I have downloaded and installed Jakarata Taglibs in my webtester web application doing the following steps.
(1) Copied fmt.tld and fmt-rt.tld along with c, x and sql tlds in my WEB-INF/tlds dir.
(2) Copied the jakarta standard JAR files in WEB-INF/lib dir. Namely jaxen-full.jar, jaxp-api.jar, jstl.jar, sax.jar, saxpath.jar, standard.jar, xalan.jar, xercesImple.jar, jdbc2_0-stdx.jar, dom.jar along with my dom4j-full.jar that I use for XML parsing.
(3) In my web.xml file I tried two approaches and none of them worked.

Alternatively :

(4)In my prepareTest.jsp I called them as
<%@ taglib prefix="fmt" uri="" %>
and alternatively (fro second case),
<%@ taglib prefix="fmt" uri="/jstl-fmt" %>
But my JSP page is not getting these tld files when I use them to format a date and a time. In the following way.
Date: <fmt:formatDate value="${date}" timeStyle="long" dateStyle="long"/>
Time: <fmt arseDate value="${date}" pattern="MM dd, YYYY"/>
I would also like to know whether you use only the minimum bundle of JARs and TLDs in your web application or use the common\lib for placing Jars? I personally always use my application's WEB_INF in the respect.

Ashik Uzzaman
Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

Oops, I found the reason behind the problem just after giving the post here!
It was nothing other than the malformat of date/time pattern. When I commented out Time: <fmt arseDate value="${date}" pattern="MM dd, YYYY"/>, things are going fine with me. I got it after exploring the tomcat's log file where I found the character 'Y' is getting problem with Jasper!
However, my second question is still in your table.
I agree. Here's the link:
subject: Taglibs not found problem
jQuery in Action, 3rd edition