Announcement Announcement Module
Collapse
No announcement yet.
Problem with Spring Webflow,JSF,richfaces integration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Spring Webflow,JSF,richfaces integration

    Hi,
    Am new to spring technology, I need to integrate Spring,webflow,JSF,richfaces in single application. After doing the necessary stuff when I ran the application the navigation seems to be not working.
    following is spanshot of configuration that I used. Please help me this is very urgent. In login.xhtml when clicking on login button it should render the projectView.xhtml but it is not working.

    web.xml
    --------

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">
    <display-name>DataAnalyzerWeb</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>




    <!-- Use Documents Saved as *.xhtml -->
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>

    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>

    <context-param>
    <description>Spring configuration file</description>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/data_analyzer_dao.xml
    /WEB-INF/data_analyzer_service.xml
    /WEB-INF/data_analyzer_context.xml
    /WEB-INF/webflow-config.xml
    </param-value>
    </context-param>

    <!--<listener>
    <listener-class>
    org.apache.myfaces.webapp.StartupServletContextLis tener
    </listener-class>
    </listener>

    --><servlet>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value></param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <url-pattern>/spring/*</url-pattern>
    </servlet-mapping>


    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <!--
    Serves static resource content from .jar files such as
    spring-faces.jar
    -->
    <servlet>
    <servlet-name>Resource Servlet</servlet-name>
    <servlet-class>org.springframework.js.resource.ResourceServ let</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <!--
    Map all /resources requests to the Resource Servlet for handling
    -->
    <servlet-mapping>
    <servlet-name>Resource Servlet</servlet-name>
    <url-pattern>/resources/*</url-pattern>
    </servlet-mapping>
    <!-- Plugging the "Blue Sky" skin into the project -->

    <context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>glassX</param-value>
    </context-param>



    <!-- Making the RichFaces skin spread to standard HTML controls -->

    <context-param>
    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
    <param-value>enable</param-value>
    </context-param>
    <listener>
    <description>Spring Loader</description>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <listener>
    <listener-class>org.springframework.web.context.request.Requ estContextListener</listener-class>
    </listener>

    <!-- Defining and mapping the RichFaces filter -->

    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    <init-param>
    <param-name>createTempFiles</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>maxRequestSize</param-name>
    <param-value>1000000</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>

    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

    </web-app>

    =============================================

    webflow-config.xml
    ------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
    xmlns:faces="http://www.springframework.org/schema/faces"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.5.xsd
    http://www.springframework.org/schema/webflow-config
    http://www.springframework.org/schem...config-2.0.xsd
    http://www.springframework.org/schema/faces
    http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
    <!--
    Executes flows: the central entry point into the Spring
    Web Flow system
    -->
    <!-- The registry of executable flow definitions -->


    <webflow:flow-registry id="flowRegistry"
    flow-builder-services="facesFlowBuilderServices" >
    <webflow:flow-location path="/WEB-INF/flows/home_flow.xml" />
    </webflow:flow-registry>


    ===================================
    home_flow.xml
    --------------
    <?xml version="1.0" encoding="UTF-8"?>
    <flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">




    <!--
    <var name="projectManagerBean" class="com.cts.mdm.analyzer.beans.viewbeans.Projec tManagerBean"/>
    -->

    <view-state id="projectView" view="/projectView.xhtml"/>

    <view-state id="login" view="/login.xhtml" >
    <transition on="login" to="projectView">
    <evaluate expression="projectManagerBean.viewProjectAction" />
    </transition>
    </view-state>

    </flow>
    =========================================
    data_analyzer_context.xml
    ---------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="projectManagerBean" class="com.cts.mdm.analyzer.beans.viewbeans.Projec tManagerBean" >
    <property name="projectViewService">
    <ref bean="projectViewService"/>
    </property>
    </bean>

    <bean id="sourceSystemListBean" class="com.cts.mdm.analyzer.beans.viewbeans.Source SystemListBean">
    <property name="sourceViewService">
    <ref bean="sourceViewService"/>
    </property>
    </bean>

    <bean id="lOVList" class="com.cts.mdm.analyzer.beans.lov.LOVList">
    <property name="lovService">
    <ref bean="lovService" />
    </property>
    </bean>

    <bean id="dBSourceConfigBean" class="com.cts.mdm.analyzer.beans.viewbeans.DBSour ceConfigBean">
    </bean>

    <bean id="fileSourceConfigBean" class="com.cts.mdm.analyzer.beans.viewbeans.FileSo urceConfigBean">
    </bean>

    <bean id="fileUploadBean" class="com.cts.mdm.analyzer.beans.util.FileUploadB ean">
    </bean>

    <bean id="flowController" class="org.springframework.webflow.mvc.servlet.Flo wController">
    <property name="flowExecutor" ref="flowExecutor"/>
    <property name="ajaxHandler">
    <bean class="org.springframework.faces.richfaces.RichFac esAjaxHandler"/>
    </property>
    </bean>

    </beans>


    Regards,
    Debashis
Working...
X