File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes [facelets] custom taglibrary not recognized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "[facelets] custom taglibrary not recognized " Watch "[facelets] custom taglibrary not recognized " New topic

[facelets] custom taglibrary not recognized

Jeroen Kema

Joined: Feb 25, 2009
Posts: 12

I'm building a JSF custom taglibrary where I define some template components. I've been struggling for a few days to solve a problem with my custom tags. The problem is that my custom tags are not rendered. This is what I've added to my project:

web.xml: (I've only picked the relevant code)



and the costuom messages.xhtml:

When I want to use the tag library in one of my pages, I simply add the namespace as following:

When I load the page in my browser, the <gtd:messages/> tag remains as it is in the html source.

When I google for similar problems, I'm finding threads where people wrote their own renderer class and added it also to the faces-config.xml. But as far as I know, I shouldn't edit the faces-config.xml when I use the <tag><tag-name/><source/></tag> tags to tag my custom facelet templates.

Can anybody help me to fix this problem?

Jeroen Kema

Joined: Feb 25, 2009
Posts: 12
I've fixed it already

I've added the following line to my gtdonline.taglib.xml file:

Now, the taglib is picked up during initialization and the custom tag is rendered in the browser
I agree. Here's the link:
subject: [facelets] custom taglibrary not recognized
It's not a secret anymore!