Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6829441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:30:03+00:00 2026-05-26T22:30:03+00:00

I am using the Apache MyFaces Commons Validator TagLib. How should i add this

  • 0

I am using the Apache MyFaces Commons Validator TagLib.

How should i add this to my web.xml? The commons JAR is downloaded and resolved through Maven.

XHTML (I think this is correct):

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      **xmlns:mcv="http://myfaces.apache.org/commons/validators"**>

web.xml:

<context-param>
  <!-- To add additional tab libs -->
  <param-name>facelets.LIBRARIES</param-name>
  <param-value>??.xml</param-value>
</context-param>

EDIT: The reason why i got to this step is because that i have tried to referenced the Maven dependency incorrectly, and in doing so, i tried to download the jar off Apache and hosted it from my own repository manager. The jar i tried to host on my own did not contain the taglib jar.

After getting the dependency correctly, everything works as per normal, there was no need to explicitly define the taglib as what balusC commended. Thankx!

<dependency>
    <groupId>org.apache.myfaces.commons</groupId>
    <artifactId>myfaces-commons</artifactId>
    <version>1.1.2</version>
</dependency>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:30:03+00:00Added an answer on May 26, 2026 at 10:30 pm

    The *.taglib.xml file of that library is already in /META-INF of the JAR. You don’t need to add anything to your web.xml. If the JAR is in webapp’s runtime classpath, the taglibs will be auto-discovered. See also chapter 10.3.2 of the JSF 2 specification:

    10.3.2 Facelet Tag Library mechanism

    …

    The run time must support two modes of discovery for Facelet tag library descriptors

    • Via declaration in the web.xml, as specified in Section 11.1.3 “Application Configuration Parameters”

    • Via auto discovery by placing the tag library discriptor file within a jar on the web application classpath, naming the file so that it ends with “.taglib.xml”, without the quotes, and placing the file in the META-INF directory in the
      jar file.

    …

    So all you need to make sure is that the JAR is indeed in the webapp’s runtime classpath -which is usually the /WEB-INF/lib folder.

    If you’re having a problem with using that library, it’s caused by something else than you think.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Apache's commons-httpclient for Java, what's the best way to add query parameters to
I am using Apache Axis to connect my Java app to a web server.
I'm using Apache Commons Logging and SLF4J with log4j, but I also want to
I am using Apache Commons Email library to send emails, but I am not
I have developed web applications using JSF (myfaces components). But in these days of
I am writing a web application using JSF 2. I have downloaded mojarra-2.1.3-FCS-binary.zip and
I'm using Apache Axis2 and need to send a custom XML structure over SOAP
I'm using Apache Commons VFS (Virtual File System) to access some files over SFTP.
I am using Apache Common Logging library in my standalone application. After searching through
I am using Apache Commons HttpClient 3.1, and I found that HttpURLConnection from Sun

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.