I found the solution, for using Jakarta Taglibs in JBoss/Tomcat with Maven:
1. Place the following dependencies in the pom.xml of your Web Application
project:
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>x</artifactId>
<version>1.1.2</version>
<type>tld</type>
</dependency>
Notice that the 2nd dependency saves you the trouble of extracting the TLD
from the jar file.
2. Maven-War-Plugin, copies the JAR file into WEB-INF/lib and the TLD file
into WEB-INF/tld:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2-SNAPSHOT</version>
</plugin>
</plugins>
</build>
3. In the web.xml of your web application, place the following lines:
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri>
<taglib-location>tld/x-1.1.2.tld</taglib-location>
</taglib>
The taglib URI was taken from the <uri> element in the x-1.1.2.tld file.
the location is relative to WEB-INF directory.
4. Place the following line in the JSP file:
<[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
5. Use the tags defines in the tld with <x:tag-name></x:tag-name>
AsafM wrote:
>
> But you are required to specify their .TLD file location, in web.xml:
> <taglib>
> <taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri>
> <taglib-location>WEB-INF/x.tld</taglib-location>
> </taglib>
>
> The problem here is that it requires you to copy the x.tld file manually
> into WEB-INF directory. It you specify a JAR file, it searches for a
> specific filename (I think its library.tld).
>
>
> nicolas de loof-3 wrote:
>>
>> taglibs don't require to have TLD files extracted from jars as long as
>> you
>> use the taglib URI in your JSP <%@ taglib %> directives. Use maven to get
>> jars in your web-inf/lib and all taglibs will be detected at server
>> startup.
>>
>> Nico.
>>
>>
>> 2008/1/13, AsafM <[EMAIL PROTECTED]>:
>>>
>>>
>>> Hi All,
>>>
>>> I have a web application we're developing, using servlets and JSP's on
>>> JBoss with embedded Tomcat.
>>>
>>> We want to use Jakarta taglib, which comes as a JAR file from maven
>>> repository (the global one).
>>>
>>> The problem is that using it requires a manual-copy step of the .TLD
>>> files
>>> from the META-INF directory in the JAR file to our
>>> src/main/webapp/WEB-INF
>>> directory.
>>>
>>> (See instructions in http://jakarta.apache.org/taglibs/binarydist.html
>>> instructions for installing Jakara Taglibs )
>>>
>>> Has anyone used Jakarta Taglibs together with maven and solved this?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Working-with-Jakarta-taglibs---question-tp14787960s177p14787960.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Working-with-Jakarta-taglibs---question-tp14787960s177p14797283.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]