0 Replies Latest reply on Feb 15, 2012 3:30 AM by darkhawk

    Richfaces problem

    darkhawk Newbie

      I dont take any problem but not displaying page.

      SpringSource Toolkit with weblogic server.Dynamic Web Page

       

      i added these jars;

      commons-beanutils-1.8.3.jar

      commons-beanutils-bean-collections-1.8.3.jar

      commons-collections-3.2.1.jar

      jsf-facelets-1.1.9.jar

      richfaces-api-3.2.2.GA.jar

      richfaces-impl-3.2.2.GA.jar

      richfaces-ui-3.2.2.GA.jar

       

      my web.xml

       

      <?xml version="1.0"?>

       

      <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>Greeter</display-name>

       

      <context-param>

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

          <param-value>Production</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>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>

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

                </context-param>

                <context-param>

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

                          <param-value>.jsf</param-value>

                </context-param>

                <context-param>

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

                          <param-value>server</param-value>

                </context-param>

                <context-param>

                          <param-name>facelets.DEVELOPMENT</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>facelets.SKIP_COMMENTS</param-name>

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

                </context-param>

                <context-param>

                          <param-name>facelets.VIEW_MAPPINGS</param-name>

                          <param-value>*.jsf</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>

       

       

                <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>

       

                <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>*.jsf</url-pattern>

                </servlet-mapping>

       

       

                <login-config>

                          <auth-method>BASIC</auth-method>

                </login-config>

       

      </web-app>

       

      my faces-config.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

       

      <faces-config

          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_1_2.xsd"

          version="1.2">

       

         <managed-bean>

            <managed-bean-name>user</managed-bean-name>

            <managed-bean-class>demo.user</managed-bean-class>

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

         </managed-bean>

        

         <application>

        <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

      </application>

       

      </faces-config>

       

      my screen => first.xhtml

       

      <!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:ui="http://java.sun.com/jsf/facelets"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">

      <h:head></h:head>

      <h:body>   

         <h:form>

              <h:panelGrid columns="3">

                  <h:outputText value="Name:" />

                  <h:inputText value="#{user.name}" />

                  <a4j:commandButton value="Say Hello" render="out" execute="@form" />

              </h:panelGrid>

          </h:form>

          <br />

          <a4j:outputPanel id="out">

              <h:outputText value="Hello #{user.name} !" rendered="#{not empty user.name}" />

          </a4j:outputPanel>

      </h:body>

      </html>