问题
I am really stumped by this problem. We have richfaces project. I wanted to use the tag instead of the because I didn't like the way the files were being passed to the bean. Our project works very well. I believe I have all of the needed depedencys in the POM, but I even manually added a few after reading this by How to setup project to support h:inputfile in JSF 2.2 @BalusC so I added
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>1.2_15</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1</version>
</dependency>
Here is my page:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:b="http://richfaces.org/sandbox/bootstrap"
template="/template.xhtml">
<ui:define name="metadata">
</ui:define>
<ui:define name="content">
<h:inputHidden id="active-bean-name" value="dataloader" />
<h:form>
<h:form id="form" enctype="multipart/form-data">
<rich:fileUpload></rich:fileUpload>
<h:inputFile id="file" value="#{DataLoaderBean.file}"/>
<h:commandButton value="Upload"
action="#{DataLoaderBean.upload}"/>
</h:form>
</h:form>
</ui:define>
</ui:composition>
Any help would be greatly appreciated.
来源:https://stackoverflow.com/questions/18898819/tag-library-supports-namespace-http-java-sun-com-jsf-html-but-no-tag-was-def