Custom validator tag and JSF

Hello I am using JSF facelets and ICEFaces and I have writen a custom validator tag as in many tutorials but for some reason I believe that the tld file that is for my custom tag is not loaded. Here is whatr I do:

public class TestTag extends ValidatorTag{

public TestTag() {

setValidatorId("testValidator");

}

public Validator createValidator() throws JspException {

TestValidator validator = (TestValidator)super.createValidator();

return validator;

}

public void release(){

super.release();

}

and the validator class:

public class TestValidator implements Validator{

public void validate(FacesContext arg0, UIComponent arg1, Object arg2) throws ValidatorException {

String str = (String)arg2;

if (str.length()<4||str.length()>10) {

//do something

}}}

I create a taglib file:

<taglib xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"

version="2.0">

<tlib-version>1.0</tlib-version>

<short-name>test</short-name>

<uri>testuri</uri>

<tag>

<display-name>testvalidator</display-name>

<name>testvalidator</name>

<tag-class>com.alex.ecm.component.validator.TestTag</tag-class>

<body-content>empty</body-content>

</tag>

</taglib>

II add the taglibrary in the web.xml:

<taglib>

<taglib-uri>/tags/test</taglib-uri>

<taglib-location>/WEB-INF/lib/test.tld</taglib-location>

</taglib>

and then I use my validator tag in the jsp page.

Unfortunatly when I start the the web application it's like the line with my validator does not exist. It is not referencing the TestTag class at all!!!

Is it possible the facelets to do something with the tld files?

What can I do? Thanks in advance!

[2154 byte] By [PeshoChukaa] at [2007-11-26 19:11:01]
# 1
You have to read the facelets developers docs [1][1] https://facelets.dev.java.net/nonav/docs/dev/docbook.html
amitteva at 2007-7-9 21:07:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...