Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Taglibs not found problem

 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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="http://java.sun.com/jstl/fmt" %>
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
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic