Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

[facelets] custom taglibrary not recognized

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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)


faces-config.xml:


gtdonline.taglib.xml:


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
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!