Polish contribution
Closes gh-22709
This commit is contained in:
@@ -753,7 +753,8 @@ When developing with JSPs, you can declare a `InternalResourceViewResolver` or a
|
|||||||
|
|
||||||
`ResourceBundleViewResolver` relies on a properties file to define the view names
|
`ResourceBundleViewResolver` relies on a properties file to define the view names
|
||||||
mapped to a class and a URL. With a `ResourceBundleViewResolver`, you
|
mapped to a class and a URL. With a `ResourceBundleViewResolver`, you
|
||||||
can mix different types of views by using only one resolver, as the following example shows:
|
can mix different types of views by using only one resolver, as the following example
|
||||||
|
shows:
|
||||||
|
|
||||||
[source,xml,indent=0]
|
[source,xml,indent=0]
|
||||||
[subs="verbatim,quotes"]
|
[subs="verbatim,quotes"]
|
||||||
@@ -771,9 +772,9 @@ can mix different types of views by using only one resolver, as the following ex
|
|||||||
productList.url=/WEB-INF/jsp/productlist.jsp
|
productList.url=/WEB-INF/jsp/productlist.jsp
|
||||||
----
|
----
|
||||||
|
|
||||||
`InternalResourceViewResolver` can also be used for JSPs. As a best practice, we
|
`InternalResourceViewResolver` can also be used for JSPs. As a best practice, we strongly
|
||||||
strongly encourage placing your JSP files in a directory under the `'WEB-INF'`
|
encourage placing your JSP files in a directory under the `'WEB-INF'` directory so there
|
||||||
directory so there can be no direct access by clients.
|
can be no direct access by clients.
|
||||||
|
|
||||||
[source,xml,indent=0]
|
[source,xml,indent=0]
|
||||||
[subs="verbatim,quotes"]
|
[subs="verbatim,quotes"]
|
||||||
@@ -1537,8 +1538,8 @@ sample:
|
|||||||
</form:form>
|
</form:form>
|
||||||
----
|
----
|
||||||
|
|
||||||
The preceding example performs an HTTP POST, with the "`real`" DELETE method hidden behind a
|
The preceding example performs an HTTP POST, with the "`real`" DELETE method hidden behind
|
||||||
request parameter. It is picked up by the `HiddenHttpMethodFilter`, which is defined in
|
a request parameter. It is picked up by the `HiddenHttpMethodFilter`, which is defined in
|
||||||
web.xml, as the following example shows:
|
web.xml, as the following example shows:
|
||||||
|
|
||||||
[source,java,indent=0]
|
[source,java,indent=0]
|
||||||
@@ -1837,8 +1838,8 @@ dynamically from the model data. The document is the view and is streamed from t
|
|||||||
server with the correct content type, to (hopefully) enable the client PC to run their
|
server with the correct content type, to (hopefully) enable the client PC to run their
|
||||||
spreadsheet or PDF viewer application in response.
|
spreadsheet or PDF viewer application in response.
|
||||||
|
|
||||||
In order to use Excel views, you need to add the Apache POI library to your classpath.
|
In order to use Excel views, you need to add the Apache POI library to your classpath. For
|
||||||
For PDF generation, you need to add (preferably) the OpenPDF library.
|
PDF generation, you need to add (preferably) the OpenPDF library.
|
||||||
|
|
||||||
NOTE: You should use the latest versions of the underlying document-generation libraries, if possible.
|
NOTE: You should use the latest versions of the underlying document-generation libraries, if possible.
|
||||||
In particular, we strongly recommend OpenPDF (for example, OpenPDF 1.0.5) instead of the
|
In particular, we strongly recommend OpenPDF (for example, OpenPDF 1.0.5) instead of the
|
||||||
@@ -1923,9 +1924,9 @@ serializers and deserializers for specific types.
|
|||||||
|
|
||||||
`MappingJackson2XmlView` uses the
|
`MappingJackson2XmlView` uses the
|
||||||
https://github.com/FasterXML/jackson-dataformat-xml[Jackson XML extension's] `XmlMapper`
|
https://github.com/FasterXML/jackson-dataformat-xml[Jackson XML extension's] `XmlMapper`
|
||||||
to render the response content as XML. If the model contains multiple entries, you should explicitly set the
|
to render the response content as XML. If the model contains multiple entries, you should
|
||||||
object to be serialized by using the `modelKey` bean property.
|
explicitly set the object to be serialized by using the `modelKey` bean property. If the
|
||||||
If the model contains a single entry, it is serialized automatically.
|
model contains a single entry, it is serialized automatically.
|
||||||
|
|
||||||
You can customized XML mapping as needed by using JAXB or Jackson's provided
|
You can customized XML mapping as needed by using JAXB or Jackson's provided
|
||||||
annotations. When you need further control, you can inject a custom `XmlMapper`
|
annotations. When you need further control, you can inject a custom `XmlMapper`
|
||||||
|
|||||||
@@ -2398,11 +2398,11 @@ Spring MVC has two main abstractions in support of flash attributes. `FlashMap`
|
|||||||
to hold flash attributes, while `FlashMapManager` is used to store, retrieve, and manage
|
to hold flash attributes, while `FlashMapManager` is used to store, retrieve, and manage
|
||||||
`FlashMap` instances.
|
`FlashMap` instances.
|
||||||
|
|
||||||
Flash attribute support is always "`on`" and does not need to be enabled explicitly. However,
|
Flash attribute support is always "`on`" and does not need to be enabled explicitly.
|
||||||
if not used, it never causes HTTP session creation. On each request, there is an "`input`"
|
However, if not used, it never causes HTTP session creation. On each request, there is an
|
||||||
`FlashMap` with attributes passed from a previous request (if any) and an "`output`"
|
"`input`" `FlashMap` with attributes passed from a previous request (if any) and an
|
||||||
`FlashMap` with attributes to save for a subsequent request. Both `FlashMap` instances
|
"`output`" `FlashMap` with attributes to save for a subsequent request. Both `FlashMap`
|
||||||
are accessible from anywhere in Spring MVC through static methods in
|
instances are accessible from anywhere in Spring MVC through static methods in
|
||||||
`RequestContextUtils`.
|
`RequestContextUtils`.
|
||||||
|
|
||||||
Annotated controllers typically do not need to work with `FlashMap` directly. Instead, a
|
Annotated controllers typically do not need to work with `FlashMap` directly. Instead, a
|
||||||
|
|||||||
Reference in New Issue
Block a user