Expert Spring MVC and Web Flow
This action is often a manual operation, helped tremendously by the chosen strategy, because many users and clients cannot be tr ...
localeResolver.setLocale(req, res, locale); return new ModelAndView("setLocaleSuccess"); } } ■Tip Spring MVC provides a LocaleCh ...
<bean id="setLocaleController" class="com.apress.expertspringmvc.chap4.SetLocaleController"> <property name="localeReso ...
FixedLocaleResolver The simplest implementation is the FixedLocaleResolver. This class allows you to define the Localein the App ...
CookieLocaleResolver The CookieLocaleResolversets and retrieves the Localeobject via a browser cookie. This strat- egy is useful ...
<bean id="sessionLocaleResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver" /> Summary So how do ...
HTTP file uploading, or “Form-based File Upload in HTML,” is defined in RFC 1867 (http://www.ietf.org/rfc/rfc1867.txt). By creat ...
Listing 5-39.MultipartHttpServletRequest Interface package org.springframework.web.multipart; public interface MultipartHttpServ ...
</bean> </beans> Note that we declared the multipart resolver in the same ApplicationContextas our Controller. We re ...
public void afterPropertiesSet() throws Exception { if (destinationDir == null) { throw new IllegalArgumentException("Must speci ...
We’ll cover binding request parameters from forms in the next chapter, so we won’t jump ahead here and confuse the topic at hand ...
Figure 5-3 illustrates the class hierarchy for the ThemeResolverand its subclasses. Figure 5-3.ThemeResolver class hierarchy The ...
Summary Spring MVC has a full-featured processing pipeline, but through the use of sensible abstractions and extensions, it can ...
The Controller Menagerie AControlleris the workhorse of Spring MVC, providing the glue between the core applica- tion and the we ...
How do you choose which controller type to implement? We believe this decision has a lot to do with you and how you think about ...
To understand the developers’ intentions, we must look at an important principle of object-oriented design entitled the Open-Clo ...
AbstractController This class provides the basic building blocks for all other Controllers. You shouldn’t have to implement your ...
Enforcing HTTP Methods By default, an AbstractControllersupports HEAD, GET, and POST methods. If an HTTP method is used for the ...
■Tip We recommend that for configuration elements that will not change, such as the supported methods for a Controller,the const ...
If you have set the property cacheSecondsto zero, the following headers will be sent: Pragma: No-cache(universal) Expires: n(wh ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf