Re: Registering custom tag libraries in Jahia

Sergiy Shyrkov <[email protected]> Thu, 07 Feb 2008 10:26:47 +0100
Newsgroups gmane.comp.cms.jahia.devel
Message-ID <[email protected]>
Hello,

in JSP 1.2 and JSP 2.0, a JSP container automatically recognizes tag =

libraries (*.tld files) if they are located in the META-INF directory of =

your JAR file. So you do not need to add anything into your Web =

application deployment descriptor (web.xml).
For example, you have created a custom tag library with the descriptor =

file 'custom.tld' and packaged it into JAR file as follows:

custom.jar
META-INF/
custom.tld
com/
homeaway/
...

In your tag library descriptor (custom.tld) you have specified the =

following URI element:
<uri>http://homeaway.com/taglibs/custom</uri>

In this case you can drop your custom.jar file into WEB-INF/lib folder, =

restart the server and use your tag library in any JSP as follows:
<%@ taglib prefix=3D"custom" uri=3D"http://homeaway.com/taglibs/custom" %>
...
<custom:myTag .../>
...

Kind regards
Sergiy Shyrkov

Michelle Michael wrote:
>
> I=92ve written a custom tag and would like to be able to just drop the =

> jar and tld into the Jahia app, but I also have to register the taglib =

> in web.xml. Have any of you found other ways to unobtrusively register =

> taglibs in Jahia, maybe with annotations?
>
> I want to keep custom integrations as decoupled as possible, so I can =

> just depoy them into any Jahai install without having to do extra =

> configuration.
>
> Thanks in advance for your ideas.
>
> Michelle Michael
>
> HomeAway, Inc.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> dev_list mailing list
> [email protected]
> http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list
>   =


_______________________________________________
dev_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list