配置Web Flow以与JSF一起使用

时间:2012-10-22 19:35:19

标签: jsf spring-mvc spring-webflow

我正在尝试配置Web Flow以与JSF一起使用。来自以下网站

http://static.springsource.org/spring-webflow/docs/2.3.x/reference/html/ch13s04.html

但是我收到以下错误:

Description Resource    Path    Location    Type
The prefix "si" for attribute "si:schemaLocation" associated with an element type "beans" is not bound. flowwithjsf.xml /WebFlowWithJSFIntegration/src/main/webapp/WEB-INF/spring   line 12 XML Problem

这是我的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"
    si:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/webflow-config
        http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
        http://www.springframework.org/schema/faces
        http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">

    <!-- Executes flows: the central entry point into the Spring Web Flow system -->
    <webflow:flow-executor id="flowExecutor">
        <webflow:flow-execution-listeners>
            <webflow:listener ref="facesContextListener"/>
        </webflow:flow-execution-listeners>
    </webflow:flow-executor>

    <!-- The registry of executable flow definitions -->
    <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF">
        <webflow:flow-location-pattern value="**/*-flow.xml" />
    </webflow:flow-registry>

    <!-- Configures the Spring Web Flow JSF integration -->
    <faces:flow-builder-services id="flowBuilderServices" />

    <!-- A listener maintain one FacesContext instance per Web Flow request. -->
    <bean id="facesContextListener" 
        class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />  

</beans>

2 个答案:

答案 0 :(得分:1)

尝试按si:schemaLocation="...更改xsi:schemaLocation="...我认为这就是您遇到此错误的原因

答案 1 :(得分:0)

“要使用此架构,请将其包含在您的一个基础架构层bean文件中” 10.2 Spring docs