Sunday 15 July 2012

file upload - h:inputFile not displaying in xhtml page with jsf 2.2 -



file upload - h:inputFile not displaying in xhtml page with jsf 2.2 -

h:inputfile not getting displayed in page. here jsf code

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html"> <h:head> </h:head> <h:body> <h:form> <h:inputfile></h:inputfile> </h:form> </h:body> </html>

actually changed namespace from

<xmlns:h="http://java.sun.com/jsf/html">

to <xmlns:h="http://xmlns.jcp.org/jsf/html">

by seeing previous problems in forums changed namespace none of ui components getting displayed including h:inputfile

i added these jar files also

jsf-impl-2.2.4 jsf-api-2.2.4

my web.xml looks this

<?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>jsfeaxmples</display-name> <context-param> <param-name>javax.faces.state_saving_method</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>javax.faces.default_suffix</param-name> <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>javax.faces.project_stage</param-name> <param-value>development</param-value> </context-param> <context-param> <param-name>javax.faces.facelets_refresh_period</param-name> <param-value>1</param-value> </context-param> <context-param> <param-name>javax.faces.facelets_skip_comments</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.separator_char</param-name> <param-value>-</param-value> </context-param> <context-param> <param-name>org.richfaces.skin</param-name> <param-value>classic</param-value> </context-param> <context-param> <param-name>facelets.build_before_restore</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>facelets.recreate_value_expression_on_build_before_restore</param-name> <param-value>true</param-value> </context-param> <servlet> <servlet-name>faces servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces servlet</servlet-name> <url-pattern>*.jsf</url-pattern> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> <context-param> <param-name>javax.servlet.jsp.jstl.fmt.localizationcontext</param-name> <param-value>resources.application</param-value> </context-param> <listener> <listener-class>com.sun.faces.config.configurelistener</listener-class> </listener> </web-app>

but still not getting displayed can 1 help me? in advance

jsf file-upload jsf-2.2

No comments:

Post a Comment