No JSF2.0 tags found

I recently played with JSF2.0 + Richface 3.3.3, I use STS as my IDE and Maven to create my project, but for some reason I cannot get the following JSF2.0 tags to work

  • h: button
  • h: link
  • e: metadata
  • f: viewParam (this is my only STS autocomplete)

It just doesn't work at runtime, saying that it cannot find component X.

I have jsf-api-2.0.2, jsf-impl-2.0.2, richfaces-api-3.3.3.final, richfaces-impl-jsf2-3.3.3.final, richfaces-ui-3.3. 3.final, jsf-facelets-1.1.15, jstl-1.0 and, obviously, "xmlns: f =" http://java.sun.com/jsf/core "xmlns: h =" http: // java. sun. com / jsf / html "in each .xhtml file, did I miss something?

This is the exact error I get:

<h:button> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: button

@EDIT: ok nevermind, my teammate found out about this because we use some external chips and we need to wait for RichFaces4.0 ...

+3
source share
2 answers

Did you delete the old jsf 1.2 libraries? Check WEB-INF/libto make sure there are no traces of JSF 1.2 libs.

Also remember that you must upgrade the file faces-configto 2.0

<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xi="http://www.w3.org/2001/XInclude"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">

Does something say when starting the servlet: INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/nameofyourapplication'(if you are using Sun for JSF)

+2
source

Could you confirm that your maven pom.xml file has the following dependency:

    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.0.2</version>
    </dependency>

After completion mvn clean install, find the jsf jar files in the directory in the project directory targetand make sure that 2.0 jars are found there.

, -, , .

0

Source: https://habr.com/ru/post/1755678/


All Articles