java - JSF tags not rendered -


i new jsf, jsf tags not rendered in xhtml file, tried out every possible solution, problem not solved

my web.xml

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="webapp_id" version="2.5">   <display-name>jsfproject</display-name>   <welcome-file-list>     <welcome-file>jsfproject/index.html</welcome-file>     <welcome-file>jsfproject/index.htm</welcome-file>     <welcome-file>jsfproject/index.jsp</welcome-file>     <welcome-file>jsfproject/default.html</welcome-file>     <welcome-file>jsfproject/default.htm</welcome-file>     <welcome-file>jsfproject/default.jsp</welcome-file>   </welcome-file-list>   <context-param>         <param-name>javax.faces.project_stage</param-name>         <param-value>development</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>*.xhtml</url-pattern>   </servlet-mapping> </web-app> 

my example.xhtml

<?xml version="1.0" encoding="iso-8859-1" ?>  <!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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>example</title> </head> <body>  <h:form>     random data: <h:inputtext/><br/>  <!-- textfield ignored -->     other data: <h:inputtext/><br/>   <!-- textfield ignored -->      </h:form>  </body> </html> 

i had spend 3 days figure out problem, welcome

the symptoms of jsf components not being parsed @ indicates facesservlet hasn't run. happen when request url doesn't match url-pattern of facesservlet definied in web.xml. mean actual url-pattern of facesservlet isn't *.xhtml @ all. looking , editing right web.xml think are? right web.xml been deployed webapp servletcontainer?


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -