|SpringSource Certified Spring Web Application Developer (Spring 3)|
|Categories||Sections and pages (may not be complete) which are related.|
|Spring-Web-Developer-Certification-Study-Guide.PDF (Spring Web Developer Certification Study Guide, from “http://mylearn.vmware.com/”)||spring-framework-reference.PDF (Reference Documentation 3.0.7)||spring-webflow-reference.PDF (Spring Web Flow Reference Guide)||springsecurity.PDF (Spring Security Reference Documentation 3.0.7)||Spring Framework Java Doc API, HTML Format (3.0.7)|
|Spring Web Overview||How Spring applications can be loaded in a Servlet
container independent of what framework is used (Spring MVC, Struts,
etc.) to develop the web layer. How does the application context get
initialised and from what files.
|Spring MVC DispatcherServlet Configuration||How to configure the DispatcherServlet in web.xml.
Where Spring-based, DispatcherServlet configuration is expected to be by convention if a location is not provided.
What configuration can be provided in the Spring-based, DispatcherServet configuration and what configuration is used by default.
An important concept to keep in mind is that the DispatcherServlet looks for certain types of Spring MVC “infrastructure” beans in its Spring configuration (see mvc-essentials-2). Examples of such types of beans include MessageSource, HandlerMapping, ViewResolver, and others. The exam will test your understanding of the purpose of these Spring MVC beans including what their purpose is, how they are discovered (by bean class type or by bean id), what implementations are configured by default, and so on. Understanding Spring MVC “infrastructure” beans as well learning how to explore what they provide is important step to learning Spring MVC. One way to learn is to open each type listed in the sections below, review the class-level JavaDoc, and explore available subtypes with the help of the Ctrl+T shortcut. Another exercise is to use Ctrl+Space in Spring configuration files on bean property names in order to see the list of available properties. These properties describe how a given infrastructure type can be customized.
|HandlerMapping||The purpose of the HandlerMapping strategy and the
details of configuring it.
How the DefaultAnnotationHandlerMapping and the ControllerClassNameHandlerMapping implementations work and what they would do in the case of specific incoming requests.
|HandlerAdapter||The purpose of the HandlerAdapter strategy and the details of configuring it.||15.3||SECTION: org.springframework.web. servlet.HandlerAdapter ('/docs/javadoc-api/org/springframework /web/servlet/HandlerAdapter.html')|
|HandlerInterceptor||The purpose of the HandlerInterceptor strategy and the details of configuring it. What points in the lifecycle of the request can be intercepted, and what data is available at each point.||15.4|
|MessageSource||The purpose of the MessageSource strategy and the details of configuring it.||Internationalization using MessageSource ... page 116||Working with messages ... page 34
Adding plain text messages ... page 34
Adding internationalized messages ... page 34
Using message bundles ... page 34
|The mvc Namespace||What is provides, what you can configure. What do mvc:annotation-driven, mvc:interceptor, and mvc:view-controller actually do?||15.12|
|Convention over Configuration||How is Spring MVC configured by default. What conventions are available to reduce explicit Coding.||15.10|
|Spring MVC Programming Model Essentials||The basics of the annotation-based programming model in Spring MVC, configuring @Controllerannotated classes, writing request-handling methods, and testing them.||15.1
Servlet API ... page 268
Spring MVC ... page 269
|@RequestMapping Annotation||The purpose of the annotation, what can be
annotated, and what options (or attributes) it provides.
How a URL breaks down (web application context, servlet name, path info) as well as which part of the URL is used in Spring MVC for request mapping purposes.
In the exam you may be given basic examples of URL's and annotated controller methods. You will be expected to predict what methods will be invoked. The best way to experiment is to try it out. Use the course labs, and check the Spring MVC logging information on each request!
Also examine the logs for output from HandlerMapping beans. HandlerMapping beans construct URL mappings during startup and log that information. Log levels for org.springframework.web must be set to DEBUG.
Below are a couple of specific scenarios to experiment with.
Scenario 1: a DefaultAnnotationHandlerMapping with one Controller and a single method annotated with @RequestMapping(“/foo”).
Questions: What URL's reach the method successfully? Does adding an extension to the URL (.pdf, .xml) make a difference? How about more segments (/foo/bar)? Passing anything (/other)? Try switching to @RequestMapping(method=RequestMethod.GET), does it still work?
Scenario 2: Similar to scenario 1 but involving a ControllerClassNameHandlerMapping, a controller (FooController) and a method (bar) annotated with @RequestMapping(method=RequestMethod.GET)
|Mapping requests with @RequestMapping ... page 421|
|Request Handling Methods||How to write methods to handle requests, what
annotations can be used, what the signature of the method can be
such as input argument types and return types, what happens if the
method returns void.
In addition to the annotations listed below, the JavaDoc of the @RequestMapping annotation is a good place to start for information on how input arguments and return values are interpreted on @RequestMapping-annotated methods.
|15.3||SECTION: org.springframework.web. bind.annotation.RequestMapping ('/docs/javadoc-api/org/springframework/ web/bind/annotation/RequestMapping.html')|
|@RequestParam and @PathVariable Annotations||The purpose of the annotation, what can be annotated, what options (or attributes) it provides, can it handle optional parameters.||Binding request parameters to
method parameters with @RequestParam... page 428
URI Templates . 423
|@ModelAttribute Annotation||The purpose of the annotation, what can be annotated, what options (or attributes) it provides, what is the default name given to a model attribute object if the attribute name is left unspecified, and what is the default attribute name given to a model attribute object that is an array or a collection.||Providing a link to data from the model with @ModelAttribute ... page 430|
|Spring MVC Views||The basics of how views work, what they do, how they're typically instantiated through the process of view resolution, what is a logical view name, and what is the default logical view name selected if a controller method leaves it unspecified (i.e. return value is void or null).||16.1|
|View Resolvers||The purpose of the ViewResolver strategy, and the
details of configuring it. Several different viewresolvers are
covered on the course.
How ViewResolver chains work and how they can be used to render multiple content types – for example to re-use the same controller method to render HTML, PDF, or XML depending on the content type requested by the client.
|Spring MVC Form Processing||The basics of working with forms such as how to
configure data binding through the @ModelAttribute annotation and
how data binding is used to populate the form object from request
Whether data binding can be used on a POST or can it also be done on a GET request (consider search forms vs. forms updating data).
How a request handling method can get access to the results of data binding.
|@SessionAttributes Annotation||The purpose of the SessionAttributes annotation,
what can be annotated, and what options it provides.
The SessionAttributes annotation provides more than one ways to specify what objects should be added to the HTTP Session. Be sure to check them. A good way to learn what options any Spring annotation provides is the JavaDoc of the annotation.
The lifecycle of attributes specified with the @SessionAttributes annotation – how long they remain around, when and how they can be removed from the HTTP Session.
How the SessionAttributes works when it's used with multiple controllers – for example is the data stored globally to the HTTP session (e.g. user preferences) or is it per-controller (e.g. account Editing).
|Specifying attributes to store in a session with @SessionAttributes ... page 431|
|@InitBinder Annotation and Data Binding Customizations||The purpose of the InitBinder annotation, what can
be annotated, and what options it provides.
What customizations can be applied to the data binding mechanism.
What error codes are generated automatically during data binding.
What error codes can be used to customize the errors generated during data binding.
|Customizing WebDataBinder initialization ... page 433|
|Spring Form Tag Library||The purpose and the value provided by the Spring form tags, and how to use them.||Using Spring's form tag library ... page 461|
|Formatters and Validation||The Spring 3 formatters, what can they do, where are
they used, how are they better than the old approach. How they
interact with the formatting annotations.
How can the form model object be validated. Understand how Spring forms leverage JSR 303 bean validation. How can error messages be customized.
|Spring Web Flow Overview||What the motivation for the existence of Spring Web
Flow is and what are the common problems it solves.
A basic understanding of how Spring Web Flow fits into Spring MVC.
|Spring Web Flow Configuration||How Spring Web Flow is configured including both
Spring MVC and Spring Web Flow-specific configuration.
Much like Spring MVC, Spring Web Flow provides and expects a few infrastructure classes to be configured as Spring beans. Some of these infrastructure beans (e.g. FlowHandlerMapping, FlowHandlerAdapter) are Spring MVC-specific, while others (e.g. FlowExecutor, FlowRegistry, and others) are specific to Spring Web Flow. Listed below are the infrastructure types you should review and understand.
|Flow Handler Mapping||The purpose of the FlowHandlerMapping strategy, the details of configuring it, and how it decides whether an incoming URL matches to any registered flows.||Dispatching to flows ... page 58|
|Flow Handler Adapter||The purpose of the FlowHandlerAdapter strategy.||Registering the FlowHandlerAdapter ... page 58|
|Flow Executor||The purpose of the FlowExecutor and what configuration options it provides.||FlowExecutor ... page 53|
|Flow Registry||The purpose of the FlowRegistry, the details of how
flows are registered and id's assigned to them.
In the exam you may be given example FlowRegistry configuration and incoming URL's. You're then expected to know which URL would match to a given flow.
Specifically consider the possibility for registering flows one by one and many at once using a pattern. In each case how does a flow get assigned an id?
|FlowRegistry ... page 53
flow-registry options ... page 54
Configuring FlowRegistry hierarchies ... page 55
|Flow Builder Services||The purpose of the FlowBuilderServices, what
configuration options it provides.
What the development mode option is.
|Configuring custom FlowBuilder services . 55|
|Spring Web Flow Essentials||What a Web Flow view state is and what it
represents. What happens when a view state is reached. How a view
state is resolved to a specific view such as a JSP page. What the
attributes of a view state are.
What a transitions in Web Flow is. What triggers a transition, what happens when a transition is triggered, and whether a transition can be prevented once it's been triggered. What global transitions are.
How a button or a link on an HTML page can be used to raise a specific Web Flow event.
What a Web Flow end state is. What happens when an end state is reached. What Web Flow does by a default for a flow that has ended. What is a good practice for what to do when a flow ends.
How to write a Web Flow unit test, what base class to extend, what methods you'd expect to override, and how to implement test methods that navigate through the flow.
|Spring Web Flow Actions||What scopes Web Flow provides and how long variables
in each scope live.
The 3 ways to create a variable in a flow definition, what the scope of the created variable is and whether it will be dependency injected in each case.
How Web Flow resolves variables encountered in the EL expressions within a flow definition. For example will it search the various web flow scopes or in Spring configuration, and are there reserved words? Also important is the order in which Web Flow goes to try to resolve variables encountered in EL.
Tip:What the reserved EL keywords are in Web Flow. Much like the JSP EL provides reserved keywords (pageContext, request, response), so does Web Flow (flashScope, requestScope, currentEvent, and others).
To make this easier, open an existing flow definition, and try to locate all the EL expressions in evaluate elements. For each expression determine what variables are used what their origin is – a reserved keyword, a scoped variable, a Spring bean? Also notice how when referencing scoped variables you don't have to specify what scope they come from – flash, view, flow, etc. Web Flow will automatically look in all scopes and try to locate the matching variable.
What the 4 different types of Web Flow actions are. Where actions can be embedded in a flow definition.
What actions are invoked when. For example what is the difference between on-render actions and on-entry actions?
How data binding and validation are enabled for a specific view state in Web Flow. How validation and data binding can be suppressed for a specific transition (e.g. cancel event).
The purpose of the data binder element.
How to implement validation logic – dedicated validator class or validate methods on the model attribute class. How Web Flow finds the validation logic. How to invoke validation logic for a specific view state.
Actions ... page 9
|Securing Web Applications With Spring Security||What web.xml configuration is required to enable
Spring Security and what the mechanism Spring Security uses to
protect web applications.
What Spring Security related configuration is needed to secure a web application.
How URL patterns should be configured.
Pay special attention to the order in which URL patterns are provided. Does it matter if you put the more general (e.g. /accounts/*) or the more specific (e.g. /accounts/edit) pattern first?
How method level security can be added to an application.
How authentication and authorization relate to each other – for example does the choice of authentication affect authorization?
What security options are available within Spring Web Flow. What elements can be made secure.
|Chapter 8||Part III