问题
I am trying to add to my site the tag I have completed my site under java EE 7 jsf 2.2 and primefaces 4.0 and was working under glassfish 4 but my production envireoment will have jboss and i noticed that there is not available the java EE 7 on this application Server, so i downgrade my site to java EE and this lead me use jsf 2.1
The problem i am facing now is that i have problems with the rendering items. specially with forms that have input file tags as i get the error
<h:inputFile> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: inputFile
If i remove this the rest page works, is rendered at browser but still does not work as it should be.
in pages that i have to render differente panelgroups (with primefaces tags inside) they are rendered but the broswer hit alerts
malformedXML: During update: javax.faces.ViewState not found
i cant understand why this is happening.
I need to fix this problem an make available to my pages the inputfile tag.
If i use primefaces inputfile still the page does not work as the render stop works at all
回答1:
<h:inputfile> is JSF 2.2 specific tag and is not available in JSF 2.1. But you can use upload component provided by component libraries. As you are already using primefaces, use their component.
回答2:
Although this question has an accepted answer, it is not always possible to use upload components from a specific component suite. Especially not if you already use another one. Many of them use e.g. jquery under the hood and unfortunately not in a no-conflict mode. A still valid alternative then is to use the solution from BalusC: http://balusc.omnifaces.org/2009/12/uploading-files-with-jsf-20-and-servlet.html
回答3:
FileUpload from Primefaces has errors and it seems that there are no plans to fix it, you can only upload the first file in each upload.
来源:https://stackoverflow.com/questions/21344019/jsf-2-1-cant-import-hinputfile