Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Webflow 2.0.8 and Spring 3.0.0

  1. #1
    Join Date
    Jan 2006
    Location
    Hamburg, Germany
    Posts
    19

    Default Webflow 2.0.8 and Spring 3.0.0

    Hi there,

    we plan to set up a new Application with Icefaces, Webflow and Spring (Spring centric).
    The dependencies should be managed with Maven2.
    Is it recommendable to combine Webflow 2.0.8 with Spring 3.0.0?
    How should my pom.xml look like?
    I would like to avoid effort if one should not combine Webflow and Spring with these versions.

    Regards,
    Hendrik

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    Webflow 2.0.8 and spring 3.0.0 don't combine due to the fact that parts of webflow have been promoted to Spring 3 core and that will conflict with names and types within webflow.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default No

    I'm using jsf 1.2 with spring webflow 2.0.7 and spring framework 3.0.0.

    I's working.

    Here is a part of a pom.xml

    Code:
           <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.webflow</groupId>
                <artifactId>org.springframework.binding</artifactId>
                <version>${webflow.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.beans</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.context</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.core</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.web</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>org.springframework.web.servlet</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>com.springsource.org.apache.commons.logging</artifactId>
                    </exclusion>
    
                </exclusions>
            </dependency>
    Last edited by lier99; Jan 27th, 2010 at 02:17 PM. Reason: more infos

  4. #4
    Join Date
    Jan 2006
    Location
    Hamburg, Germany
    Posts
    19

    Default

    Thanks for replying.

    I will give it a try and psot my learnings in this thread.

  5. #5
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    Maybe I should extend my first post.

    It will work as long as you ONLY use webflow as soon as you will try to mix mvc:annotation-driven together with webflow you will run into the issues explained earlier.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  6. #6
    Join Date
    Jan 2006
    Location
    Hamburg, Germany
    Posts
    19

    Default

    Hi Marten,

    thanks for pointing this out.
    Means: I can use Webflow 2.0.8, Spring 3.0.0 and Spring MVC as long as I stay away from annotations?

    Regards,
    Hendrik

  7. #7
    Join Date
    Jul 2008
    Posts
    157

  8. #8
    Join Date
    Jan 2006
    Location
    Hamburg, Germany
    Posts
    19

    Default

    Quote Originally Posted by triqui View Post
    Do you mean the combination of Tiles and Ajax?
    I do not plan to use Tiles but Ajax...

    I will try to run the webflow-sample "booking-faces" with Spring 3.0.0.
    All the examples have annotations when using the persistence mechanisms (JPA).
    I hope this is not a problem?

  9. #9
    Join Date
    Jan 2006
    Location
    Hamburg, Germany
    Posts
    19

    Default

    ok - I was able to build and run the sample-application with Spring 3.0.0 RELEASE.
    If I run into any problems with my own project I will post it here.
    Thanks for the support so far.

  10. #10
    Join Date
    Nov 2006
    Location
    Boston, MA
    Posts
    303

    Default

    There is absolutely no reason why you cannot use Spring 3.0 with SWF 2.0.8! And Tiles, for that matter. Most of the above posts that state otherwise are misleading or completely incorrect. Frankly, I am surprised to see such statements here.

    There are a few restrictions, or should I say, requirements that you need to keep in mind to successfully combine SWF 2.0.8 and Spring 3.0. Most notably, you would have to use a separate, explicitly defined conversion service for WebFlow that should be named other than the default "conversionService". You can't use some of the latest Spring 3.0 features within the flows, such as annotated formatting, etc. You can use the new Spring annotations all you want inside the rest of your Spring MVC controllers and other objects. If you annotate your model objects with, say validation or formatting annotations, it's fine except that functionality won't be utilized by SWF, but you can still take advantage of that in your MVC controllers.

    I have just built a commercial web application with fairly complex requirements that utilizes SWF 2.0.8, Spring 3.0.0, Spring Security 2.0.5, Tiles 2.1.3, Servlet 2.5, JSTL 1.2. (Not using Ajax, so can't say.) The application makes good use of annotated MVC controllers including most latest 3.0 features. Everything fits nicely.

    And, yes, it is absolutely ok to use "mvc:annotation-driven" as long as you explicitly define the "old" SWF beans, such as the conversion service - for your SWF use only.

    Here's an example of POM dependencies for the web-related stuff (the ${version}s values are the ones mentioned above):

    Code:
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <!--
                Spring MVC for Servlet Environments (depends on spring-core, spring-beans, spring-context, spring-web)
            -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web.servlet</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>org.springframework.web.servlet</artifactId>
                <version>${spring.version}</version>
            </dependency>
    
            <!-- Spring WebFow -->
            <dependency>
                <groupId>org.ognl</groupId>
                <artifactId>com.springsource.org.ognl</artifactId>
                <version>2.6.9</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.webflow</groupId>
                <artifactId>org.springframework.js</artifactId>
                <version>${spring.webflow.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.webflow</groupId>
                <artifactId>org.springframework.webflow</artifactId>
                <version>${spring.webflow.version}</version>
            </dependency>
    
            <!-- Tiles support -->
            <dependency>
                <groupId>org.apache.tiles</groupId>
                <artifactId>com.springsource.org.apache.tiles</artifactId>
                <version>${tiles.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tiles</groupId>
                <artifactId>com.springsource.org.apache.tiles.core</artifactId>
                <version>2.1.2.osgi</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tiles</groupId>
                <artifactId>com.springsource.org.apache.tiles.jsp</artifactId>
                <version>${tiles.version}</version>
            </dependency>
    
            <!-- Clean URLs with JSPs -->
            <dependency>
                <groupId>org.tuckey</groupId>
                <artifactId>com.springsource.org.tuckey.web.filters.urlrewrite</artifactId>
                <version>${urlrewrite.version}</version>
            </dependency>
    
            <!-- Servlet API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>${servlet.version}</version>
            </dependency>
    
            <!-- JSP API (NOTE: version 2.1 requires Servlet 2.5) -->
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <scope>provided</scope>
                <version>${jsp.version}</version>
            </dependency>
    
            <!-- JSTL implementation and taglibs (NOTE: version 1.2 requires Servlet 2.5 and JSP 2.1)  -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>${jstl.version}</version>
            </dependency>
    Last edited by constv; Jan 29th, 2010 at 08:50 AM.

Posting Permissions

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