Book Image

Spring Web Flow 2 Web Development

By : Markus Stäuble, Sven Lüppken
Book Image

Spring Web Flow 2 Web Development

By: Markus Stäuble, Sven Lüppken

Overview of this book

<p>Many web applications need to take the user through a defined series of steps such as e-commerce checkouts or user registrations. Spring Web Flow works well for rich and flexible user interaction, additionally it helps you to describe the flow of websites in complex processes. Spring Web Flow 2 provides the perfect way to build these kinds of features, keeping them secure, reliable, and easy to maintain.<br /><br />This book provides a platform on which you can build your own applications and services. It gives detailed information on Spring basics and covers core topics involving testing, security, and so on. We develop a complete, robust web application using the latest version of Spring, where page navigation is done on-the-fly.<br /><br />This book teaches you how to work with Spring Web Flow. It covers both basic and advanced aspects and provides a detailed reference of the features Spring Web Flow. The book helps readers to extend the framework. <br /><br />The integration of Spring and Java Server Pages is clearly explained in the book. The book also explains the essential modules of the complete Spring framework stack and teaches how to manage the control flow of a Spring web application.<br /><br />The Spring Faces module will provide integration between Spring Web Flow and Java Server Faces (JSF). Testing, an important aspect of the software development process is covered towards the end; the question of how to test a Spring Web Flow application is answered.</p>
Table of Contents (14 chapters)
Spring Web Flow 2 Web Development
Credits
About the Authors
About the Reviewers
Preface
flow.trac:The Model for the Examples

Migrating an application


If you have a running Spring Web Flow 2 application, there is the question on how to run it on the SpringSource dm server. The documentation of the SpringSource dm Server contains a detailed instruction on how to migrate a web application to a proprietary PAR archive. With the proprietary PAR format, you save some of the necessary configuration. In this appendix, we show you the important steps.

Note

Chapter 7 of the documentation inside the programmer-guide of the SpringSource dm Server is an important chapter. The chapter is available online at http://static.springsource.com/projects/ dm-server/1.0.x/programmer-guide/html/ch07.html.

  1. 1. Because one of the cornerstones of the SpringSource dm Server is the Tomcat Servlet Engine, you can directly run your WAR archive on that server. But you still cannot profit from all the benefits of the SpringSource dm Server. To run your WAR archive, simply copy the archive into the pickup folder of the SpringSource dm Server.

  2. 2. The next step towards OSGi is to remove the libraries from the WAR file and get the dependencies from the container. That is described in Chapter 7.3 of the programmer-guide of SpringSource dm Server at http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s03.html.

    Note

    Where to get a library that can be used inside the OSGi container?

    If you want to use a library in an OSGi container, the library must provide some important information inside the manifest, MANIFEST.MF, which is located in the META-INF folder of a JAR archive. For your own libraries, it is not a big task to provide that information in the manifest. Mostly, the manifest is created through your build process. But for external libraries, it is recommended not to add the information manually. The solution is the SpringSource Enterprise Bundle Repository which is located at http://www.springsource.com/repository/app/. That web application contains hundreds of open source libraries, which contain the essential information inside the manifest and can therefore be used inside an OSGi container. Therefore, if you search a library, use that repository. By the way, the SpringSource Enterprise Bundle Repository runs on the SpringSource dm Server, and is therefore one of the first productive applications on that server.

  3. 3. After you have removed the libraries from your WAR archive and used the libraries directly from the SpringSource dm Server, the next step is to externalize the services. That step is described in Chapter 7.4 of the programmer-guide. The URL of that chapter is http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s04.html.

  4. 4. The last step towards the PAR archive is described inside the Chapter 7.5 of the programmer-guide. The URL of that chapter is http://static.springsource.com/projects/dm-server/1.0.x/programmer-guide/html/ch07s05.html.