0 Replies Latest reply on Mar 3, 2011 7:40 AM by Bronislav Pechmik

    When adding PrettyFaces to project with RichFaces url mapping doesn`t work

    Bronislav Pechmik Newbie

      I have project writed with RichFaces. Evry thing works ok. But I want`s to hide some parts of url (/faces/ and other), for this oportunity I have added PrettyFaces to my project. And url mapping doesn`t work. When I removed RichFaces from my project evry thin worked fine.

      Here is my web.xml

       

       

      <?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.FACELETS_VIEW_MAPPINGS</param-name>
              <param-value>*.xhtml</param-value>
          </context-param>
        
          <context-param>
              <param-name>org.richfaces.SKIN</param-name>
              <param-value>blueSky</param-value>
          </context-param>
        
          <context-param>
              <param-name>org.richfaces.CONTROL_SKINNING</param-name>
              <param-value>enable</param-value>
          </context-param>
          <context-param>
              <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
              <param-value>com.sun.facelets.FaceletViewHandler</param-value>
          </context-param>
      
          <filter>
              <display-name>RichFaces Filter</display-name>
              <filter-name>richfaces</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>
              <init-param>
                  <param-name>enable-cache</param-name>
                  <param-value>false</param-value>
              </init-param>
          </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>
          <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>/faces/*</url-pattern>
          </servlet-mapping>
      
          <session-config>
              <session-timeout>
                  60
              </session-timeout>
          </session-config>
      
          <context-param>
              <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
              <param-value>true</param-value>
          </context-param>
      
          <welcome-file-list>
              <welcome-file>faces/index.xhtml</welcome-file>
          </welcome-file-list>
      </web-app>
      
      

       

      Here is my faces-config:

       

       

      <faces-config version="2.0"
          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-facesconfig_2_0.xsd">
      
          <navigation-rule>
              <description></description>
              <from-view-id>/index.xhtml</from-view-id>
              <navigation-case>
                  <from-outcome>newxhtml</from-outcome>
                  <to-view-id>/newxhtml.xhtml</to-view-id>
                  <redirect/>
              </navigation-case>
          </navigation-rule>
      </faces-config>
      
      

       

      I am using RicgFaces 3.3.3, Glassfish 3.0.1 and PrettyFaces 3.2.0

      What is wrong?