Results 1 to 4 of 4

Thread: FlowHandlerAdapter, FlowController and AbstractFlowHandler questions

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    8

    Default FlowHandlerAdapter, FlowController and AbstractFlowHandler questions

    Hi, I used spring web flow some time ago (more than a year) for a tiny project, and it was my first contact. Now that I'm starting another thing I've tried SWF 2, and there are some things I don't understand at all, and I don't really remember much about SWF1.

    As far as I know, when talking about web applications, we have the following scenario (I'm writing it because maybe my mistake is in this knowledge I'm assuming to be true):

    1. The dispatcher servlet receives a request. It asks the configured HandlerMapping(s) until anyone returns a HandlerExecutionChain (assuming there is such mapping for the request).

    2. The HandlerExecutionChain has interceptors, and an Object, the Handler.

    3. The DispatcherServlet uses a HandlerAdapter to execute te code from the handler and service the request.

    Now, for Controller implementations we have the SimpleControllerHandlerAdapter. There is also a FlowHandlerAdapter, meaning there would be a custom Handler for flows, and there is an abstract class that I could subclass, but... I could just use the FlowController, right? As the FlowController is a Controller, I have the SimpleControllerHandlerAdapter already, but I'm not quite sure if I need the FlowHandlerAdapter.

    I don't know when should I use each of them. When using SWF1 I just used the FlowController but I don't want to miss the point of using a custom FlowHandler.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Use FlowHandlerMapping in conjunction with FlowHandlerAdapter as described in ref manual and demoed in samples. For the simplest possible web flow sample, look at this new web flow project template here: https://src.springsource.org/svn/spr.../webflow/trunk.

    FlowController is old school and not nearly as elegant...

    Keith
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Feb 2007
    Posts
    8

    Default

    Ok, I'll try that then. Thanks for the clarification and for the template.

  4. #4
    Join Date
    Oct 2008
    Posts
    286

    Default

    I've seen the template for swf2 but it kinda confusing with the pom.xml contents..

    it uses the following:
    Code:
    		<!-- Container-provided dependencies-->
    		<dependency>
    			<groupId>javax.servlet</groupId>
    			<artifactId>servlet-api</artifactId>
    			<version>2.4</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>javax.servlet.jsp</groupId>
    			<artifactId>jsp-api</artifactId>
    			<version>2.1</version>
    			<scope>provided</scope>
    		</dependency>
    And Apache Tomcat (http://tomcat.apache.org/whichversion.html) says:
    Code:
    Servlet/JSP Spec  	Apache Tomcat version  	Actual release revision
    2.5/2.1 			6.0.x 			6.0.24
    2.4/2.0 			5.5.x 			5.5.28
    May we ask the tomcat version of the template?

    Quote Originally Posted by Keith Donald View Post
    Use FlowHandlerMapping in conjunction with FlowHandlerAdapter as described in ref manual and demoed in samples. For the simplest possible web flow sample, look at this new web flow project template here: https://src.springsource.org/svn/spr.../webflow/trunk.

    FlowController is old school and not nearly as elegant...

    Keith
    Eros

    Environment:
    JSP 2.0
    Dojo 1.4.1
    Ext JS 3.1 (testing)
    Spring MVC 2.5.6.SEC01 (planning to Spring 3 using STS)
    STS
    SWF 2.0.9.RELEASE
    Tiles 2.0.5
    iBatis: ibatis-sqlmap-2.3.4.726

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •