Announcement Announcement Module
Collapse
No announcement yet.
Webflow 2.0.8 and Spring 3.0.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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, 03:17 PM. Reason: more infos

      Comment


      • #4
        Thanks for replying.

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

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment


            • #7
              And as long as you stay away from Tiles and Ajax.

              See:
              http://jira.springframework.org/browse/SWF-1136

              Related:
              http://jira.springframework.org/browse/SWF-1078
              http://jira.springframework.org/browse/SWF-1053

              Comment


              • #8
                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?

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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, 09:50 AM.

                    Comment


                    • #11
                      This are great news!
                      Thank you. You confirm what I already assumed.
                      As the webflow reference application for JSF works with the spring 3.0 dependencies, I was wondering where the problems are.

                      I was experiencing some problems when integrating Icefaces.
                      Suddenly Maven included the el-api.jar into my WAR. I had to exclude this one in the dependency for the icefaces components in my pom.
                      But now this works fine as well.

                      Comment


                      • #12
                        Originally posted by Marten Deinum
                        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.
                        Which is also what I tried to explain, although not fully. You will have to fully configure either one instead of relying on the defaults. Which basically means duplicating the configuration especially if you are using custom Converters/Formatters due to the changed packaging.

                        Comment


                        • #13
                          Originally posted by constv View Post
                          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.
                          Sorry, you are right. I see now that my statement was incorrect.
                          What you are not able to do is using the following combination: Spring 3 release, webflow, Tiles and Ajax.

                          If you need all these to work together (including ajax), as I stated in SWF-1136, you have to stick to Spring 3.0.0M3, Webflow 2.0.8 and Tiles 2.0.7. So everything works except cascaded attributes.
                          If you are not using ajax or not using tiles, it should work fine with spring 3 release, At least i didn't have any issue in my few tests. (I needed all of them)

                          If you find a way of making all these work together (using Spring 3 release, any version of Tiles), please, let me know, cause I tried everything to no avail and would be more than happy with any working solution.

                          Comment

                          Working...
                          X