Skip to content

Commit 462d047

Browse files
committed
Typo fixes and formatting
1 parent 85332c7 commit 462d047

File tree

2 files changed

+48
-49
lines changed

2 files changed

+48
-49
lines changed

src/docs/asciidoc/web/webmvc-view.adoc

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -285,20 +285,20 @@ The parameters to any of the above macros have consistent meanings:
285285
and bound to the command object. Map objects stored against the keys are the labels
286286
displayed on the form to the user and may be different from the corresponding values
287287
posted back by the form. Usually, such a map is supplied as reference data by the
288-
controller. You can use any `Map` implementation, depending on required behavior. For
289-
strictly sorted maps, you can use a `SortedMap` (such as a `TreeMap`) with a suitable `Comparator`
290-
and, for arbitrary Maps that should return values in insertion order, use a
291-
`LinkedHashMap` or a `LinkedMap` from `commons-collections`.
292-
* `separator`: Where multiple options are available as discreet elements (radio buttons or
293-
checkboxes), the sequence of characters used to separate each one in the list (such as
294-
`<br>`).
295-
* `attributes`: An additional string of arbitrary tags or text to be included within the
296-
HTML tag itself. This string is echoed literally by the macro. For example, in a
297-
`textarea` field, you may supply attributes (such as 'rows="5" cols="60"'), or you could pass
298-
style information such as 'style="border:1px solid silver"'.
299-
* `classOrStyle`: For the `showErrors` macro, the name of the CSS class that the `span` element
300-
that wraps each error uses. If no information is supplied (or the value is empty),
301-
the errors are wrapped in `<b></b>` tags.
288+
controller. You can use any `Map` implementation, depending on required behavior.
289+
For strictly sorted maps, you can use a `SortedMap` (such as a `TreeMap`) with a
290+
suitable `Comparator` and, for arbitrary Maps that should return values in insertion
291+
order, use a `LinkedHashMap` or a `LinkedMap` from `commons-collections`.
292+
* `separator`: Where multiple options are available as discreet elements (radio buttons
293+
or checkboxes), the sequence of characters used to separate each one in the list
294+
(such as `<br>`).
295+
* `attributes`: An additional string of arbitrary tags or text to be included within
296+
the HTML tag itself. This string is echoed literally by the macro. For example, in a
297+
`textarea` field, you may supply attributes (such as 'rows="5" cols="60"'), or you
298+
could pass style information such as 'style="border:1px solid silver"'.
299+
* `classOrStyle`: For the `showErrors` macro, the name of the CSS class that the `span`
300+
element that wraps each error uses. If no information is supplied (or the value is
301+
empty), the errors are wrapped in `<b></b>` tags.
302302

303303
The following sections outline examples of the macros (some in FTL and some in VTL). Where usage
304304
differences exist between the two languages, they are explained in the notes.
@@ -799,7 +799,8 @@ When developing with JSPs, you can declare a `InternalResourceViewResolver` or a
799799

800800
`ResourceBundleViewResolver` relies on a properties file to define the view names
801801
mapped to a class and a URL. With a `ResourceBundleViewResolver`, you
802-
can mix different types of views byusing only one resolver, as the following example shows:
802+
can mix different types of views by using only one resolver, as the following example
803+
shows:
803804

804805
====
805806
[source,xml,indent=0]
@@ -810,17 +811,17 @@ can mix different types of views byusing only one resolver, as the following exa
810811
<property name="basename" value="views"/>
811812
</bean>
812813
813-
# And a sample properties file is uses (views.properties in WEB-INF/classes):
814+
# And a sample properties file is used (views.properties in WEB-INF/classes):
814815
welcome.(class)=org.springframework.web.servlet.view.JstlView
815816
welcome.url=/WEB-INF/jsp/welcome.jsp
816817
817818
productList.(class)=org.springframework.web.servlet.view.JstlView
818819
productList.url=/WEB-INF/jsp/productlist.jsp
819820
----
820821
821-
`InternalResourceBundleViewResolver` can also be used for JSPs. As a best practice, we
822-
strongly encourage placing your JSP files in a directory under the `'WEB-INF'`
823-
directory so there can be no direct access by clients.
822+
`InternalResourceViewResolver` can also be used for JSPs. As a best practice, we strongly
823+
encourage placing your JSP files in a directory under the `'WEB-INF'` directory so there
824+
can be no direct access by clients.
824825
825826
[source,xml,indent=0]
826827
[subs="verbatim,quotes"]
@@ -838,7 +839,7 @@ directory so there can be no direct access by clients.
838839
[[mvc-view-jsp-jstl]]
839840
=== JSPs versus JSTL
840841

841-
When using the Java Standard Tag Library you must use a special view class, the
842+
When using the JSP Standard Tag Library (JSTL) you must use a special view class, the
842843
`JstlView`, as JSTL needs some preparation before things such as the I18N features can
843844
work.
844845

@@ -1612,7 +1613,7 @@ or see the tag library description.
16121613
A key principle of REST is the use of the "`Uniform Interface`". This means that all
16131614
resources (URLs) can be manipulated by using the same four HTTP methods: GET, PUT, POST,
16141615
and DELETE. For each method, the HTTP specification defines the exact semantics. For
1615-
instance, a GET should always be a safe operation, meaning that is has no side effects,
1616+
instance, a GET should always be a safe operation, meaning that it has no side effects,
16161617
and a PUT or DELETE should be idempotent, meaning that you can repeat these operations
16171618
over and over again, but the end result should be the same. While HTTP defines these
16181619
four methods, HTML only supports two: GET and POST. Fortunately, there are two possible
@@ -1625,8 +1626,7 @@ with a hidden `method` parameter is converted into the corresponding HTTP method
16251626
request.
16261627

16271628
To support HTTP method conversion, the Spring MVC form tag was updated to support setting
1628-
the HTTP method. For example, the following snippet comes from the Pet Clinic
1629-
sample:
1629+
the HTTP method. For example, the following snippet comes from the Pet Clinic sample:
16301630

16311631
====
16321632
[source,xml,indent=0]
@@ -1638,8 +1638,8 @@ sample:
16381638
----
16391639
====
16401640

1641-
The preceding example perform an HTTP POST, with the "`real`" DELETE method hidden behind a
1642-
request parameter. It is picked up by the `HiddenHttpMethodFilter`, which is defined in
1641+
The preceding example performs an HTTP POST, with the "`real`" DELETE method hidden behind
1642+
a request parameter. It is picked up by the `HiddenHttpMethodFilter`, which is defined in
16431643
web.xml, as the following example shows:
16441644

16451645
====
@@ -1833,7 +1833,7 @@ implementations. See the Tiles documentation for details on how to use
18331833
You can specify `SimpleSpringPreparerFactory` to autowire `ViewPreparer` instances based on
18341834
specified preparer classes, applying Spring's container callbacks as well as applying
18351835
configured Spring BeanPostProcessors. If Spring's context-wide annotation configuration has
1836-
been activated, annotations in `ViewPreparer` classes aree automatically detected and
1836+
been activated, annotations in `ViewPreparer` classes are automatically detected and
18371837
applied. Note that this expects preparer classes in the Tiles definition files, as
18381838
the default `PreparerFactory` does.
18391839

@@ -1843,7 +1843,7 @@ application context. The full bean creation process is in the control of the Spr
18431843
application context in this case, allowing for the use of explicit dependency injection
18441844
configuration, scoped beans, and so on. Note that you need to define one Spring bean definition
18451845
for each preparer name (as used in your Tiles definitions). The following example shows
1846-
how to define a set a `SpringBeanPreparerFactory` property on a `TilesConfigurer` bean:
1846+
how to define a `SpringBeanPreparerFactory` property on a `TilesConfigurer` bean:
18471847

18481848
====
18491849
[source,xml,indent=0]
@@ -1911,7 +1911,7 @@ Similar requirements apply for implementing `AbstractRssFeedView`, as the follow
19111911
[source,java,indent=0]
19121912
[subs="verbatim,quotes"]
19131913
----
1914-
public class SampleContentAtomView extends AbstractRssFeedView {
1914+
public class SampleContentRssView extends AbstractRssFeedView {
19151915
19161916
@Override
19171917
protected void buildFeedMetadata(Map<String, Object> model,
@@ -1956,13 +1956,13 @@ dynamically from the model data. The document is the view and is streamed from t
19561956
server with the correct content type, to (hopefully) enable the client PC to run their
19571957
spreadsheet or PDF viewer application in response.
19581958

1959-
In order to use Excel views, you need to add the Apache POI library to your classpath,
1959+
In order to use Excel views, you need to add the Apache POI library to your classpath.
19601960
For PDF generation, you need to add (preferably) the OpenPDF library.
19611961

1962-
NOTE: You should use the latest versions of the underlying document-generation libraries, if possible.
1963-
In particular, we strongly recommend OpenPDF (for example, OpenPDF 1.0.5) instead of the
1964-
outdated original iText 2.1.7, since OpenPDF is actively maintained and fixes an important
1965-
vulnerability for untrusted PDF content.
1962+
NOTE: You should use the latest versions of the underlying document-generation libraries,
1963+
if possible. In particular, we strongly recommend OpenPDF (for example, OpenPDF 1.0.5)
1964+
instead of the outdated original iText 2.1.7, since OpenPDF is actively maintained and
1965+
fixes an important vulnerability for untrusted PDF content.
19661966

19671967

19681968

@@ -2027,9 +2027,9 @@ The `MappingJackson2JsonView` uses the Jackson library's `ObjectMapper` to rende
20272027
content as JSON. By default, the entire contents of the model map (with the exception of
20282028
framework-specific classes) are encoded as JSON. For cases where the contents of the
20292029
map need to be filtered, you can specify a specific set of model attributes to encode
2030-
by using the `modelKeys` property. You can also use the `extractValueFromSingleKeyModel` property
2031-
to have the value in single-key models extracted and serialized directly rather than
2032-
as a map of model attributes.
2030+
by using the `modelKeys` property. You can also use the `extractValueFromSingleKeyModel`
2031+
property to have the value in single-key models extracted and serialized directly rather
2032+
than as a map of model attributes.
20332033

20342034
You can customize JSON mapping as needed by using Jackson's provided
20352035
annotations. When you need further control, you can inject a custom `ObjectMapper`
@@ -2044,9 +2044,9 @@ serializers and deserializers for specific types.
20442044

20452045
`MappingJackson2XmlView` uses the
20462046
https://github.com/FasterXML/jackson-dataformat-xml[Jackson XML extension's] `XmlMapper`
2047-
to render the response content as XML. If the model contains multiples entries, you should explicitly set the
2048-
object to be serialized by using the `modelKey` bean property.
2049-
If the model contains a single entry, it is serialized automatically.
2047+
to render the response content as XML. If the model contains multiple entries, you should
2048+
explicitly set the object to be serialized by using the `modelKey` bean property. If the
2049+
model contains a single entry, it is serialized automatically.
20502050

20512051
You can customized XML mapping as needed by using JAXB or Jackson's provided
20522052
annotations. When you need further control, you can inject a custom `XmlMapper`
@@ -2060,12 +2060,11 @@ you need to provide serializers and deserializers for specific types.
20602060
== XML Marshalling
20612061

20622062
The `MarshallingView` uses an XML `Marshaller` (defined in the `org.springframework.oxm`
2063-
package) to render the response content as XML. You can explicitly set the object to be marshalled
2064-
by using a `MarshallingView` instance's `modelKey` bean property. Alternatively, the view
2065-
iterates over all model properties and marshals the first type that is supported
2063+
package) to render the response content as XML. You can explicitly set the object to be
2064+
marshalled by using a `MarshallingView` instance's `modelKey` bean property. Alternatively,
2065+
the view iterates over all model properties and marshals the first type that is supported
20662066
by the `Marshaller`. For more information on the functionality in the
2067-
`org.springframework.oxm` package, see
2068-
<<data-access.adoc#oxm,Marshalling XML using O/X Mappers>>.
2067+
`org.springframework.oxm` package, see <<data-access.adoc#oxm,Marshalling XML using O/X Mappers>>.
20692068

20702069

20712070

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,11 +2491,11 @@ Spring MVC has two main abstractions in support of flash attributes. `FlashMap`
24912491
to hold flash attributes, while `FlashMapManager` is used to store, retrieve, and manage
24922492
`FlashMap` instances.
24932493

2494-
Flash attribute support is always "`on`" and does not need to enabled explicitly. However,
2495-
if not used, it never causes HTTP session creation. On each request, there is an "`input`"
2496-
`FlashMap` with attributes passed from a previous request (if any) and an "`output`"
2497-
`FlashMap` with attributes to save for a subsequent request. Both `FlashMap` instances
2498-
are accessible from anywhere in Spring MVC through static methods in
2494+
Flash attribute support is always "`on`" and does not need to be enabled explicitly.
2495+
However, if not used, it never causes HTTP session creation. On each request, there is an
2496+
"`input`" `FlashMap` with attributes passed from a previous request (if any) and an
2497+
"`output`" `FlashMap` with attributes to save for a subsequent request. Both `FlashMap`
2498+
instances are accessible from anywhere in Spring MVC through static methods in
24992499
`RequestContextUtils`.
25002500

25012501
Annotated controllers typically do not need to work with `FlashMap` directly. Instead, a

0 commit comments

Comments
 (0)