problems using inputFile in JSF 2.1

2

I'm using the JSF 2.1 version with this artifact below;

<dependency>
    <groupId>org.glassfish</groupId>
    <artifactId>javax.faces</artifactId>
    <version>2.1.21</version>
    <scope>compile</scope>
</dependency>

I need to use inputFile as shown below;

        <p:outputLabel value="Imagem do Produto" />
        <h:inputFile value="#{cadastroProdutoBean.arquivo}" />

I know you need to use the following tag below;

xmlns:i="http://xmlns.jcp.org/jsf/html"

I did not recognize it, what is wrong? What does it take for me to make the inputFile be recognized on the page?

Posting update //////////////////////////////////////////// ///////////

I'm having a hard time enabling the inputFile of JSF, since I knew that inputFile only works in the JSF project of version 2.2. So I decided to create the Zero project and be able to convert to the latest version as you can see;

I still have problems and need help.

    
asked by anonymous 14.12.2015 / 15:53

1 answer

2

Friend,

By including the line xmlns:**i**="http://xmlns.jcp.org/jsf/html" you have named this pool of components with the letter i . So try to use the component with the following tag

<i:inputFile value="#{cadastroProdutoBean.arquivo}" />                       
    
06.01.2016 / 19:04