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

  • SEARCH
  • Home
  • 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 9238745
In Process

The Archive Base Latest Questions

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

I am trying to set up something that will look like a multiple screen

  • 0

I am trying to set up something that will look like a multiple screen process of setting up a booking for example.

  • Screen 1 Add personal information
  • Screen 2 Contact information
  • Screen 3 Summary and confirm

I have set up my .jsp and xml webflow and all of the classes, but I am having problems linking them. I want to create an Account class at the beginning of the flow. When the first screen is filled out, the information gets stored in that class. When at the final screen the user can view the summary based on the information he provided and revise if necessary, when he goes back to first screen, the information will be filled out already for him so he does not have to re-enter.

I am sorry for the wall of code. I tried to minimize it to the possible places for an error I could think of.

My flow-config.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">

    <on-start>
        <evaluate expression="BookingManagementService.createBooking()" result="flowScope.booking" />
    </on-start>

    <view-state id="flow-config"  view="booking/BookingIdentificationScreen" model="booking">
    <binder>
        <binding property="username" />
    </binder>
    <transition on="next" to="enterContactDetails"/>
    <transition on="cancel" to="cancel"/>
</view-state>
    ... 
</flow>

My general servlet-context.xml

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

    <annotation-driven />

    <resources mapping="/resources/**" location="/resources/" />

    <beans:bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <beans:property name="prefix" value="/WEB-INF/views/" />
        <beans:property name="suffix" value=".jsp" />
    </beans:bean>

    <context:component-scan base-package="com.mycompany.myapp" />

    <beans:bean id="handlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
    <beans:bean name="/index.do" class="com.mycompany.myapp.IndexController" />
    <beans:bean name="/home.do" class="com.mycompany.myapp.HomeController" />

    <beans:bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <beans:property name="mappings" value="/account/flow-config.do=flowController" />
        <beans:property name="alwaysUseFullPath" value="true"/>
    </beans:bean>

    <!-- SPRING WEB FLOW STUFF -->
    <beans:bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
        <beans:property name="flowExecutor" ref="flowExecutor"/>
    </beans:bean>

    <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"/>

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

    <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="viewFactoryCreator"/>

    <beans:bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
        <beans:property name="viewResolvers">
            <beans:list>
                <beans:ref bean="viewResolver"/>
            </beans:list>
        </beans:property>
    </beans:bean>

</beans:beans>

BookingManagementService.java

@Service("bookingService")
public class BookingManagementService{
    @Transactional(readOnly = true)
    public BookingIpl createBooking(Long hotelId, String username) {
        BookingIpl booking= new BookingIpl();
        return booking;
    }
}

BookingIpl.java

@Entity
public class BookingIpl implements Serializable {
    public String username;
    ...
}

IndexController

   @Controller
   public class IndexController extends AbstractController {
    private BookingManagementService bookingService;

    @Autowired
    public IndexController(BookingManagementService bookingService) {
        this.bookingService = bookingService;
    }
    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
            HttpServletResponse arg1) throws Exception {
        return new ModelAndView("index");
    }
}

so in my java scripts for the first screen I would have something like:

<form:form modelAttribute="booking" action="${flowExecutionUrl}" method="post">
     <form:input type="text" path="username"/>
</form:form>

and after the prompt to the next screen I want to return the value in a summary for example

 <form:form modelAttribute="booking" action="${flowExecutionUrl}" method="post">
         <spring:bind path="username">${status.value}</spring:bind>
    </form:form>

The error I am getting is along the line of:

SEVERE: Servlet.service() for servlet [appServlet] in context with path [/myapp] threw exception [Request processing failed; nested exception is org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@778e65f2 targetAction = [EvaluateAction@25c73030 expression = bookingService.createBooking(), resultExpression = flowScope.booking], attributes = map[[empty]]] in state 'null' of flow 'flow-config' -- action execution attributes were 'map[[empty]]'] with root cause
org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'bookingService' cannot be found on object of type 'org.springframework.webflow.engine.impl.RequestControlContextImpl'

I tried another method to do all of this which is defining a bean in my servlet like so:

<beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="prototype" />

but this did not help either, gave the same error.

I am very new to web-flow and spring, so please forgive me if the mistake I made was something obvious.

Thank you

  • 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-18T07:50:02+00:00Added an answer on June 18, 2026 at 7:50 am

    From what it looks that you need to share object between Multiple flows. I guess you can store object in session scope

    so

    <beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="prototype" />
    

    Would be changed to

    <beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="session" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to multithread something and i have my program set up such that
I'm trying to set a function to do something like this def __binaryTreeInsert(self, toInsert,
Is it possible to set for(AssociatedControlID) attribute using jQuery? I am trying something like
My urls will look like: http://example.com/whatever#page?x=1&locale=hu&y=2 http://example.com/whatever#page?x=1&locale=hu http://example.com/whatever#page?locale=hu http://example.com/whatever#page?locale= http://example.com/whatever#page?x=1 http://example.com/whatever#page http://example.com/whatever I'd like
I need to be able to handle data that can look like: set setting1
im trying to achieve something but i dont really know how I have set
I'm trying to call a actor to do something time consuming. The caller set
I'm trying to write a shell script that will make several targets into several
I'm trying to set up a Rails Template that would allow for comprehensive set-up
I am trying to do something that I feel to be very simple in

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.