java - JSF2.0 tomcat6.x and Rich faces 3.3 Error -


my web.xml file is

<?xml version="1.0" encoding="utf-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"            xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"    xsi:schemalocation="http://java.sun.com/xml/ns/javaee          http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">      <context-param>         <param-name>javax.faces.project_stage</param-name>         <param-value>production</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>/faces/*</url-pattern>     </servlet-mapping>     <context-param>         <param-name>javax.faces.disable_facelet_jsf_viewhandler</param-name>         <param-value>true</param-value>     </context-param>      <context-param>         <param-name>org.richfaces.skin</param-name>         <param-value>bluesky</param-value>     </context-param>       <!--configuration richfaces-->     <filter>         <display-name>richfaces filter</display-name>         <filter-name>richfaces</filter-name>         <filter-class>org.ajax4jsf.filter</filter-class>     </filter>     <filter-mapping>         <filter-name>richfaces</filter-name>         <servlet-name>faces servlet</servlet-name>         <dispatcher>request</dispatcher>         <dispatcher>forward</dispatcher>         <dispatcher>include</dispatcher>     </filter-mapping>     <!--end of configuration part richfaces-->      <!--configuration facelets-->     <context-param>         <param-name>javax.faces.default_suffix</param-name>         <param-value>.jsp</param-value>     </context-param>     <context-param>         <param-name>facelets.recreate_value_expression_on_build_before_restore</param-name>         <param-value>false</param-value>     </context-param>     <context-param>         <param-name>facelets.view_mappings</param-name>         <param-value>*.xhtml</param-value>     </context-param>     <context-param>         <param-name>facelets.skip_comments</param-name>         <param-value>true</param-value>     </context-param>     <!--end of configuration part facelets-->  </web-app> 

and facelet-config file

<?xml version="1.0" encoding="utf-8"?> <faces-config version="1.2"                  xmlns="http://java.sun.com/xml/ns/javaee"                 xmlns:xi="http://www.w3.org/2001/xinclude"                 xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"                  xsi:schemalocation="http://java.sun.com/xml/ns/javaee            http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"> <managed-bean>     <description>managed bean homecontent</description>     <managed-bean-name>sample1</managed-bean-name>     <managed-bean-class>com.test.sample1</managed-bean-class>     <managed-bean-scope>session</managed-bean-scope> </managed-bean> 

and facelet is

<!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: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">     <f:view>         <head>                  <title>facelet page</title>         </head>         <body>             <h:form id="sampleform" binding="#{sample1.initform}">                                <rich:panel>                     <a4j:outputpanel id="sampleoutputpanel">                          <h:outputtext value="username : "/>                         <h:inputtext value="#{sample1.username}"/>                          <a4j:commandbutton value="test"                               rerender="sampleoutputpanel,output"                              action="#{sample1.displaybuttonaction}"/>                          <h:outputtext id="output"           value="typed username : #{sample1.displayvalue}"/>                     </a4j:outputpanel>                 </rich:panel>             </h:form>         </body>     </f:view> </html> 

when run facelet file prompted downloading option. unable see facelet file. 1 tell wrong in files?

used tomcat 7.x version , richfaces 4.x version worked. realized due version mismatch.


Comments