The TLD is usually packaged with the Jar files for the JSTL.  First of all, 
make sure you are getting standard-???.jar and jstl-???.jar in your war.  Then, 
do the following on standard.jar to convince yourself the tlds exist:

jar -tf standard.jar 

You should see something like the following:

... a bunch of classes ...
META-INF/c-1_0-rt.tld
META-INF/c-1_0.tld
META-INF/c.tld
META-INF/fmt-1_0-rt.tld
META-INF/fmt-1_0.tld
META-INF/fmt.tld
META-INF/fn.tld
META-INF/permittedTaglibs.tld
META-INF/scriptfree.tld
META-INF/sql-1_0-rt.tld
META-INF/sql-1_0.tld
META-INF/sql.tld
META-INF/x-1_0-rt.tld
META-INF/x-1_0.tld
META-INF/x.tld

Now, in order for your servlet container (Tomcat?) to find them in the jar, it 
has to support Servlet API 2.3 or 2.4 and you have to configure your web.xml to 
be compliant with the 2.3 doctype at least.  I'm using 2.4, so the first few 
lines of my web.xml look like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
    version="2.4">

If you already have a <web-app> element, replace it with the above.  And remove 
a <DOCTYPE> entry if one exists.  

If you can't do 2.4, you'll have to do some googling for help with 2.3.  If you 
can't do 2.3, you'll probably have to extract the tlds from the jars, but I'm 
not sure how that would work with Maven.

K.C.


-----Original Message-----
From: Akins, Greg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 14, 2005 7:38 AM
To: Maven Users List
Subject: JSTL tld dependencies


I'm having trouble getting a webapp to function correctly when using
Core & Sql JSTL tags.
 
It seems like this should be pretty simple.
 
I use maven (1.0.2) genapp struts to create the app.
 
Include a JSTL dependency to get the jar files
 
My jsp page has these definitions
 
        <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql"
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
I tried a dependency like
 
<groupId>JSTL
<artifactId>C
<type>tld
 
but get build errors that c-.tld could not be found?
 
And I couldn't find any other examples.  This has got to be a simple
problem; sorry I'm not getting it.
 
Any help would be greatly appreciated
 
Greg Akins
Software Engineer
Sony Electronics, STP Systems
724.696.7322 (Sony)
724.696.6147 (AV)
724.454.7790 (Cell)
412.590.3973 (Pager)
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to