[solved] New to Pretty Faces.

Splash Forums PrettyFaces Users [solved] New to Pretty Faces.

This topic contains 2 replies, has 3 voices, and was last updated by  void_void 7 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17746

    Thomas
    Participant

    Hi, I’m new for the pretty faces development.

    Recently, I’m studying and get in use of the JSF in Netbeans 6.8 IDE.

    I found pretty faces quite useful for my project.

    I’m trying to use one of the function to re-writing my url of my project.

    First, I have follow the instructions (http://ocpsoft.com/prettyfaces/docs/#customparsing)to setup the pretty faces into my project, but I failed to set it up to my project.

    Below is my project some files description:

    1.web.xml

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; 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>com.sun.faces.verifyObjects</param-name>

    <param-value>false</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.validateXml</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

    <param-value>client</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>

    30

    </session-timeout>

    </session-config>

    <welcome-file-list>

    <welcome-file>faces/welcomeJSF.jsp</welcome-file>

    </welcome-file-list>

    </web-app>

    2.faces-config.xml

    <?xml version=’1.0′ encoding=’UTF-8′?>

    <faces-config version=”1.2″

    xmlns=”http://java.sun.com/xml/ns/javaee&#8221;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;

    xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd“>

    <navigation-rule>

    <from-view-id>/login.jsp</from-view-id>

    <navigation-case>

    <from-outcome>success</from-outcome>

    <to-view-id>/success.jsp</to-view-id>

    </navigation-case>

    <navigation-case>

    <from-outcome>fail</from-outcome>

    <to-view-id>/fail.jsp</to-view-id>

    </navigation-case>

    </navigation-rule>

    <navigation-rule>

    <from-view-id>/welcomeJSF.jsp</from-view-id>

    <navigation-case>

    <from-outcome>login</from-outcome>

    <to-view-id>/login.jsp</to-view-id>

    </navigation-case>

    </navigation-rule>

    <managed-bean>

    <managed-bean-name>LoginForm</managed-bean-name>

    <managed-bean-class>JSFLogin.LoginForm</managed-bean-class>

    <managed-bean-scope>request</managed-bean-scope>

    </managed-bean>

    </faces-config>

    Can your show me how to make the setup of it and currently I’m using JSF 1.2 and Pretty faces 2.0.3?

    Thanks.

    #19969

    Subodh
    Participant

    i m aslo Using JSF1.2 with richfaces,in Eclipse IDE and using latest Version Of Preetyfacesjas12-3.0.1.jar for JSF1.2 i did this entry in web.xml File

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    </filter>

    Let me know if u need any other Help

    #19970

    void_void
    Participant

    I ‘d created a sample application.

    for jsf 2.0.

    which may be useful to you.

    Check this out.

    http://www.4shared.com/file/M9h7dt9S/MavenJSFSample.html

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.