0 Replies Latest reply on Feb 18, 2009 7:58 AM by lukep1984

    Spring Web Flow with JSF/RichFaces

      I need some hints about this connection of frameworks on JBoss.
      I get message on browser when I try to start application.
      type Status report
      message /Projekt/WEB-INF/layouts/.xhtml
      description The requested resource (/Projekt/WEB-INF/layouts/.xhtml) is not available.


      index.html:

      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html>
      <head>
       <meta http-equiv="Refresh" content="0; URL=flows/login">
      </head>
      </html>


      spring-config.xml:
      <!-- Spring Web Flow -->
       <flow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
       <flow:flow-location-pattern value="/WEB-INF/flows/login.xml"/>
       </flow:flow-registry>
      
       <flow:flow-executor id="flowExecutor"/>
      
       <!-- Configures the Spring Web Flow JSF integration -->
       <faces:flow-builder-services id="facesFlowBuilderServices"/>
      
       <!-- Handles requests mapped to the Spring Web Flow system -->
       <bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
       <property name="flowExecutor" ref="flowExecutor"/>
       <property name="ajaxHandler">
       <bean class="org.springframework.faces.richfaces.RichFacesAjaxHandler"/>
       </property>
       </bean>
      
       <!-- Maps logical view names to Facelet templates (e.g. 'search' to '/WEB-INF/search.xhtml' -->
       <bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
       <property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
       <property name="prefix" value="/WEB-INF/" />
       <property name="suffix" value=".xhtml" />
       </bean>
      
       <!-- Maps request URIs to controllers -->
       <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
       <property name="mappings">
       <props>
       <prop key="/flows/*">flowController</prop>
       </props>
       </property>
       <property name="defaultHandler">
       <!-- Selects view names to render based on the request URI: e.g. /main selects "main" -->
       <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
       </property>
       </bean>


      web.xml
      <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       </welcome-file-list>
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.jsp</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.VIEW_MAPPINGS</param-name>
       <param-value>*.xhtml</param-value>
       </context-param>
      
       <listener>
       <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
       </listener>
       <servlet>
       <servlet-name>dispatcher</servlet-name>
       <servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class>
       <init-param>
       <param-name>contextConfigLocation</param-name>
       <param-value>/WEB-INF/spring-config.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>dispatcher</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-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>*.faces</url-pattern>
       </servlet-mapping>


      Thanks for all responses.