-
1. Re: custom JSF component with facelets
pmuir Dec 4, 2006 4:18 AM (in response to dgallego)It shouldn't be, no.
Put it in META-INF/ if you are putting the facelets in a jar included in WEB-INF/lib. Put it in WEB-INF if you are just putting the facelets straight into your war.
BTW I never needed that parameter for tomahawk if I put the tomahawk.taglib.xml in WEB-INF (or a sub directory). -
2. Re: custom JSF component with facelets
dgallego Dec 4, 2006 8:12 AM (in response to dgallego)OK, if i move the tomahawk.taglib.xml to tomahawk.jar!META-INF , it works, but with my tags this doesn't work :( any idea?
My my.jar!META-INF content:
taglib.tld (tags for MyFaces without facelets, for example).
faces-config.xml (the JSF components).
nt.taglib.xml (the link between the component-type and the component-class, the facelets)
Thanks for your help petemuir -
3. Re: custom JSF component with facelets
pmuir Dec 4, 2006 8:23 AM (in response to dgallego)You should see log messages when you access your first facelets page
13:20:37,850 ERROR [STDERR] 04-Dec-2006 13:20:37 com.sun.facelets.compiler.TagLibraryConfig loadImplicit INFO: Added Library from: jar:file:/Z:/jboss/jboss-4.0.5.GA/server/default/./deploy/spm-seam.ear/spm-seam.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
for all the tag libraries facelets can load (for the entire app). If your nt.taglibrary.xml isn't mentioned please post your war structure.
If it is then you've probably got a namespace typo between nt.taglib.xml and your facelet. -
4. Re: custom JSF component with facelets
dgallego Dec 4, 2006 9:06 AM (in response to dgallego)This is the structure of the jar under my /WEB-INF/lib/:
META-INF:
- faces-config.xml
- nt.taglib.xml
- taglib.tld
and the packets structure containing my tags and JSF components.
My tags work only if I specify facelets.LIBRARIES option under web.xml.
faces-config.xml:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" "http://java.sun.com/dtd/web-facesconfig_1_0.dtd"> <faces-config> <component> <component-type>component.Version</component-type> <component-class>component.Version</component-class> </component> </faces-config>
nt.taglib.xml:<?xml version="1.0"?> <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "facelet-taglib_1_0.dtd"> <facelet-taglib> <namespace>http://www.ntrying.com</namespace> <tag> <tag-name>version</tag-name> <component> <component-type>component.Version</component-type> </component> </tag> </facelet-taglib>
taglib.tld:<?xml version="1.0"?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>nt</short-name> <uri>http://www.ntrying.com</uri> <display-name>NTrying.com.</display-name> <!-- <nt:version /> --> <tag> <name>version</name> <tag-class>taglib.VersionTag</tag-class> <body-content>empty</body-content> <description> The current version of the Ntrying library. </description> </tag> </taglib>
-
5. Re: custom JSF component with facelets
pmuir Dec 4, 2006 9:27 AM (in response to dgallego)I'm not sure then, I suggest you ask on the facelets list.
https://facelets.dev.java.net -
6. Re: custom JSF component with facelets
dgallego Dec 4, 2006 9:31 AM (in response to dgallego)Thanks!
-
7. Re: custom JSF component with facelets
ffischer Feb 23, 2007 8:15 PM (in response to dgallego)"dgallego" wrote:
Thanks!
Did you ever find a solution for this problem? I have the exact same situation.
Regards,
Frank -
8. Re: custom JSF component with facelets
dilator Feb 24, 2007 5:21 AM (in response to dgallego)I think you have to specify it in web.xml if you do not package your library in to its own jar file?