From f5fd349ddd6692f424aa5182488f04ef51951b8c Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 20 Mar 2009 15:19:42 +0000 Subject: [PATCH] polish --- .../webapp/WEB-INF/tutorial/webflowSetup.jsp | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp index b72d8d28..cb359d2e 100644 --- a/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp +++ b/spring-webflow-samples/getting-started-with-spring-webflow/src/main/webapp/WEB-INF/tutorial/webflowSetup.jsp @@ -60,9 +60,9 @@

The example above shows the configuration for a Spring web application spread across three files. - app-config.xml configures your components that carry out application-specific controller, business, and data access logic. - mvc-config.xml configures the Spring MVC framework infrastructure, including the properties of the DispatcherServlet. - webflow-config configures the Spring Web Flow infrastructure, which plugs into Spring MVC. + The app-config.xml file configures your components that carry out application-specific controller, business, and data access logic. + The mvc-config.xml file configures the Spring MVC framework infrastructure, including the properties of the DispatcherServlet. + The webflow-config.xml file configures the Spring Web Flow infrastructure.

We also generally recommend using annotations to configure your application components, and externalized XML to configure infrastructure. @@ -145,13 +145,7 @@ If no annotation-based path mapping is found, Spring MVC proceeds to the next HandlerMapping (order=2 below). --> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> <property name="order" value="1" /> - </bean> - - <!-- Maps requests to @Controllers based on controller class name convention; e.g. a request for /hotels or a /hotels sub-resource maps to HotelsController - If no class mapping is found, Spring MVC sends a 404 response and logs a pageNotFound warning. --> - <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"> - <property name="order" value="2" /> - </bean> + </bean>

Once a request has been mapped to a handler object such as a @Controller of web flow, the DispatcherServlet uses the HandlerAdapter registered for that kind of handler to invoke it. @@ -168,12 +162,24 @@ </bean>

- To illustrate the DispatcherServlet pipeline, the following graphic illustrates the sequence when a request is mapped to a web flow:
- + To illustrate a typical DispatcherServlet pipeline, the following graphic illustrates the sequence of events that happen in this application when the /tutorial resource is requested, which is handled by the web flow you are interacting with right now:
+ " />

- The following graphic shows the sequence when a request is mapped to a @Controller:
- + In this scenario, the FlowHandlerMapping returned the tutorial flow which was then invoked by the FlowHandlerAdapter. +

+

+ The following graphic shows the sequence in this application when the /welcome resource is requested, which is handled by the annotated WelcomeController:
+ " /> +

+

+ In this scenario, the FlowHandlerMapping returned null because the /welcome resource was not mapped to a web flow. + The DefaultAnnotationHandlerMapping was then queried and returned the WelcomeController, which was invoked by the AnnotationMethodHandlerAdapter. +

+

+ The main point to understand here is there is one-time configuration that enables full customization of the DispatcherServlet processing pipeline. + Once this configuration is established, you simply create new controllers and web flows, and they get picked up and hooked into the pipeline automatically. + No other configuration is required.

Next >