Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8925927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:49:50+00:00 2026-06-15T07:49:50+00:00

i´m trying to setup a JSF application with Spring Web Flow. I´m using Spring

  • 0

i´m trying to setup a JSF application with Spring Web Flow.

I´m using Spring 3.1
Spring faces 2.3.1
JSF (api,impl) 2.1.6

My problem is the following that the program is not taking the correct
location of my jsf views.

I have found some tutorials like

or http://dgparsons.org/jsf-and-spring-webflow.html
for integrating jsf and spring web flow.

In one of these view resolving is done with:

<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/views" />
<property name="suffix" value=".xhtml" />
</bean>

And so I put my xhtml files in the folder /WEB-INF/views/

My Flow is in the directory /WEB-INF/config/flow/start.flow

When I gave it a try the program always wants to open the start.xhtml
from the folder /WEB-INF/config/flow/start.xhtml

So it seems it is completly ignoring the UrlBasedViewResolver.

My FlowBuilderServices is configured as following:

<beans:bean id="flowBuilderServices"
    class="org.springframework.webflow.engine.builder.support.FlowBuilderServices">
...
<beans:property name="viewFactoryCreator"> 
       <beans:bean
         class="org.springframework.faces.webflow.JsfViewFactoryCreator" /> 
     </beans:property>

...
 </beans:bean>

In the tutorials there is no JsfViewFactoryCreator and I cant find a tutorial about it.

As from the javadoc JsfViewFactoryCreator/JsfViewFactory is responsible for the RESTORE_VIEW phase.
So I dived into the source code of the getView() Method of the JsfViewFactory.

JsfViewFactory.java

In line 105

UIViewRoot viewRoot = viewHandler.restoreView(facesContext, viewName);

a FlowViewHandler is called, which generates the wrong path relative to the path of my flow files.

resourcePath = resolveResourcePath(RequestContextHolder.getRequestContext(), viewId);

So my question is now. How can I associate the UrlBasedViewResolver correctly with the flowRegistry/flowbuilderservices so that it takes /WEB-INF/views/*.xthml as my path to the xhtml files.

Or if it is maybe old fashioned to use UrlBasedViewResolver (as I didnt see it in the spring web flow documentation for jsf) how can the webflow beans be configured correctly to use the directories i defined.

For completeness here is my webflow-config.xml file

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

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

  <beans:bean id="flowBuilderServices"
    class="org.springframework.webflow.engine.builder.support.FlowBuilderServices">
    <beans:property name="expressionParser">
      <beans:bean
        class="org.springframework.webflow.expression.el.WebFlowELExpressionParser">
        <beans:constructor-arg>
          <beans:bean class="com.sun.el.ExpressionFactoryImpl" />
        </beans:constructor-arg>
      </beans:bean>
    </beans:property>
    <beans:property name="viewFactoryCreator"> 
       <beans:bean
         class="org.springframework.faces.webflow.JsfViewFactoryCreator" /> 
     </beans:property>
    <beans:property name="conversionService">
      <beans:bean
        class="org.springframework.binding.convert.service.DefaultConversionService">
      </beans:bean>
    </beans:property>
  </beans:bean>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:49:52+00:00Added an answer on June 15, 2026 at 7:49 am

    So finally I found the way to it myself and it was quite simple.

    As written in the documentation of spring webflow under – Specifying view identifiers
    Spring Webflow Documentation

    the solution is to use an absolute view identifier in the flow definition:

    <view-state id="enterBookingDetails" view="/WEB-INF/hotels/booking/bookingDetails.xhtml">
    

    Thus there is no need for a URLBasedViewResolver or a special configuration of JSFViewFactoryCreator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying setup a web application with JSF 2.0 + Hibernate 4 and
I'm trying to setup the application server part of C2DM push messaging using this
OK, so I am trying to set up a simple JSF application. I'm using
Im trying to setup a program that will accept an incoming email and then
I have connecting to my database in a JSF web application that I am
I am trying to get JSF setup to use files with a html extension.
Im trying to setup my asp.net mvc page like the following image: The header
I have been trying to setup git for our web development team unsuccessfully. Some
I'm trying setup a map that displays different pin colors depending on the type/class
Trying to setup my laptop to edit and run my C# application which called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.