I am trying to implement a very simple RichFaces application (following the example in the developer's guide , but I am encountering an error that I cannot solve.
My code seems to build and deploy Tomcat (localhost) correctly, but when the index page opens, I get an exception:
javax.faces.view.facelets.TagException: /index.xhtml @13,19 <a4j:form> Tag Library supports namespace: http://richfaces.org/a4j, but no tag was defined for name: form
The index page I'm trying to load is as follows:
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <title>Facelet Title</title> </h:head> <h:body><f:view> <a4j:form> <rich:panel header="This is the title" style="width:400px;"> <h:outputText value="Enter your name:"/> <h:inputText value="#{MyBean.message}"> <f:validateLength minimum="1" maximum="20"/> </h:inputText> </rich:panel> </f:view></a4j:form> </h:body> </html>
This is the same as the example in the developer's guide, as far as I can tell. I am developing in NetBeans 6.8 using the JSF 2.0 implementation in MyFaces and adding RichFaces and Apache Commons jar as libraries, and the tag indicated by the exception is actually automatically offered by Netbeans!
From Apache Commons, I added:
beanutils, collections, digester, logging
From RichFaces I added: richfaces-api, richfaces-impl, richfaces-impl-jsf2, richfaces-ui
If it would be helpful to provide bean and / or web.xml code, say so, I just wanted to avoid a huge message, which could be a simple mistake.