<h:outputtext> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: outputtext -
using jsf 2.2, jboss 7. while running keep getting " tag library supports namespace: http://java.sun.com/jsf/html, no tag defined name: outputtext" error.. me solve problem..
below xhtml file. error on "" line.
index.xhtml:
<?xml version='1.0' encoding='utf-8' ?> <!doctype composition public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <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:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" template="template/ui.xhtml"> <ui:define name="body"> <h3>welcome jsf lab</h3> <h4>pure jsf</h4> <p> <!-- shows error or success message --> <h:outputtext value="#{fileuploadmbean.message}" rendered="#{!empty fileuploadmbean.message}"> </h:outputtext> <!-- notice enctype file upload --> <h:form prependid="false" enctype="multipart/form-data"> <h:panelgrid> <!-- input files --> <h:inputfile value="#{fileuploadmbean.file1}"></h:inputfile> <h:inputfile value="#{fileuploadmbean.file2}"/> <!-- action responsible uploading file(s) --> <h:commandbutton action="#{fileuploadmbean.uploadfile()}" value="upload" /> </h:panelgrid> </h:form> </p> </ui:define> </ui:composition>
this bean file above xml file..
fileuploadmbean.java @managedbean @viewscoped public class fileuploadmbean implements serializable { private static final long serialversionuid = 1l; private part file1; private part file2; private string message; public part getfile1() { return file1; } public void setfile1(part file1) { this.file1 = file1; } public part getfile2() { return file2; } public void setfile2(part file2) { this.file2 = file2; } public string getmessage() { return message; } public void setmessage(string message) { this.message = message; } public string uploadfile() throws ioexception { //upload code } }
i know libraries , versions okay. because when run bean class xhtml working fine same h:outputtext showing no error.. problem not understanding. configuration issue or else.
as balus c says in comment typo mistake
use
<h:outputtext> </h:outputtext> <h:panelgrid></h:panelgrid> <h:commandbutton action="#{fileuploadmbean.uploadfile}" value="upload" ></h:commandbutton>
Comments
Post a Comment