2 Replies Latest reply on Aug 27, 2010 10:10 PM by balteo

    My facelets code appears in the browser source code...

    balteo

      Hello,

      I have a problem with my app: the facelets code does not get executed/interpreted and appears in the browser source code.

      How can I sort this out please?

      Problem is described in detail here: http://community.jboss.org/thread/155792?tstart=0

      Thanks in advance,

      Julien.

       

      pS: I followed the same format as : richfaces-demo-jsf2-3.3.3.Final-tomcat6.war

        • 1. Re: My facelets code appears in the browser source code...
          ahoehma

          I guess your setup is wrong

           

          Check your web.xml  for

           

          • Faces Servlet + Mapping
          • A4J Filter + Mapping
          • Facelets Viewhandler(s)
          • 2. Re: My facelets code appears in the browser source code...
            balteo

            Thanks Andreas,

            I have checked my web.xml and there does not seem to be anything wrong. (I use 3.3.3 of richfaces) Here it 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">
                <display-name>Site Jean-Baptiste Martin ${pom.version}</display-name>
                <context-param>
                    <param-name>contextConfigLocation</param-name>
                    <param-value>classpath:root-application-config.xml</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>facelets.DEVELOPMENT</param-name>
                    <param-value>false</param-value>
                </context-param>
                <context-param>
                    <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                    <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                </context-param>
                <context-param>
                    <param-name>facelets.LIBRARIES</param-name>
                    <param-value>/WEB-INF/jbm.taglib.xml</param-value>
                </context-param>
                <context-param>
                    <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
                    <param-value>false</param-value>
                </context-param>
                <context-param>
                    <param-name>com.jeanbaptistemartin.static.url</param-name>
                    <param-value>http://static.jeanbaptistemartin.com/sculptures</param-value>
                </context-param>
                <context-param>
                    <param-name>com.jeanbaptistemartin.version</param-name>
                    <param-value>${pom.version}</param-value>
                </context-param>
                <context-param>
                    <param-name>facelets.SKIP_COMMENTS</param-name>
                    <param-value>true</param-value>
                </context-param>
                <context-param>
                    <param-name>facelets.REFRESH_PERIOD</param-name>
                    <param-value>-1</param-value>
                </context-param>
                <context-param>
                    <param-name>org.richfaces.ExcludeScripts</param-name>
                    <param-value>Prototype,Scriptaculous,jQuery</param-value>
                </context-param>
                <context-param>
                    <param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
                    <param-value>com.jeanbaptistemartin.view</param-value>
                </context-param>
                <context-param>
                 <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
                 <param-value>true</param-value>
            </context-param>

             


                <listener>
                    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
                </listener>
                <listener>
                    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                </listener>

             

                <servlet>
                    <servlet-name>Faces Servlet</servlet-name>
                    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                    <load-on-startup>1</load-on-startup>
                </servlet>
                <servlet>
                    <servlet-name>CaptchaServlet</servlet-name>
                    <servlet-class>com.jeanbaptistemartin.util.CaptchaServlet</servlet-class>
                </servlet>
                <servlet>
                    <servlet-name>DesinscriptionAbonneServlet</servlet-name>
                    <servlet-class>com.jeanbaptistemartin.util.DesinscriptionAbonneServlet</servlet-class>
                </servlet>
                <servlet>
                    <servlet-name>RedirigeVersSculptureServlet</servlet-name>
                    <servlet-class>com.jeanbaptistemartin.util.RedirigeVersSculptureServlet</servlet-class>
                </servlet>
                <servlet-mapping>
                    <servlet-name>Faces Servlet</servlet-name>
                    <url-pattern>*.jsf</url-pattern>
                </servlet-mapping>
                <filter>
                    <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
                    <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
                </filter>
                <filter>
                    <filter-name>Pretty Filter</filter-name>
                    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
                </filter>
                <filter>
                    <filter-name>ajax4jsf</filter-name>
                    <filter-class>org.ajax4jsf.Filter</filter-class>
                    <init-param>
                        <param-name>forceparser</param-name>
                        <param-value>true</param-value>
                    </init-param>
                </filter>
                <filter>
                    <filter-name>DisableUrlSessionFilter</filter-name>
                    <filter-class>com.jeanbaptistemartin.util.DisableUrlSessionFilter</filter-class>
                </filter>
                <filter-mapping>
                    <filter-name>DisableUrlSessionFilter</filter-name>
                    <url-pattern>/*</url-pattern>
                </filter-mapping>
                <filter-mapping>
                    <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
                    <url-pattern>/*</url-pattern>
                </filter-mapping>
                <filter-mapping>
                    <filter-name>Pretty Filter</filter-name>
                    <url-pattern>/*</url-pattern>
                    <dispatcher>FORWARD</dispatcher>
                    <dispatcher>REQUEST</dispatcher>
                    <dispatcher>ERROR</dispatcher>
                </filter-mapping>
                <filter-mapping>
                    <filter-name>ajax4jsf</filter-name>
                    <servlet-name>Faces Servlet</servlet-name>
                    <dispatcher>REQUEST</dispatcher>
                    <dispatcher>FORWARD</dispatcher>
                    <dispatcher>INCLUDE</dispatcher>
                </filter-mapping>
                <servlet-mapping>
                    <servlet-name>CaptchaServlet</servlet-name>
                    <url-pattern>/CaptchaServlet</url-pattern>
                </servlet-mapping>
                <servlet-mapping>
                    <servlet-name>DesinscriptionAbonneServlet</servlet-name>
                    <url-pattern>/DesinscriptionAbonneServlet</url-pattern>
                </servlet-mapping>
                <servlet-mapping>
                    <servlet-name>RedirigeVersSculptureServlet</servlet-name>
                    <url-pattern>/RedirigeVersSculptureServlet</url-pattern>
                </servlet-mapping>
                <session-config>
                    <session-timeout>30</session-timeout>
                </session-config>
                <welcome-file-list>
                    <welcome-file>accueil.jsf</welcome-file>
                </welcome-file-list>
                <security-constraint>
                    <display-name>jbmConstraint</display-name>
                    <web-resource-collection>
                        <web-resource-name>jbmAll</web-resource-name>
                        <description/>
                        <url-pattern>/*</url-pattern>
                        <http-method>GET</http-method>
                        <http-method>POST</http-method>
                        <http-method>HEAD</http-method>
                        <http-method>PUT</http-method>
                        <http-method>OPTIONS</http-method>
                        <http-method>TRACE</http-method>
                        <http-method>DELETE</http-method>
                    </web-resource-collection>
                </security-constraint>
                <security-constraint>
                    <display-name>jbmConstraint</display-name>
                    <web-resource-collection>
                        <web-resource-name>jbmAll</web-resource-name>
                        <description/>
                        <url-pattern>/*</url-pattern>
                        <http-method>GET</http-method>
                        <http-method>POST</http-method>
                        <http-method>HEAD</http-method>
                        <http-method>PUT</http-method>
                        <http-method>OPTIONS</http-method>
                        <http-method>TRACE</http-method>
                        <http-method>DELETE</http-method>
                    </web-resource-collection>
                </security-constraint>
                <login-config>
                    <auth-method>BASIC</auth-method>
                    <realm-name>jbmRealm</realm-name>
                </login-config>
            </web-app>