`ne` (`!=`), `div` (`/`), `mod` (`%`), `not` (`!`). These are case insensitive.
@ -1230,7 +1230,8 @@ where the entry value is less than 27.
@@ -1230,7 +1230,8 @@ where the entry value is less than 27.
In addition to returning all the selected elements, it is possible to retrieve just the
first or the last value. To obtain the first entry matching the selection the syntax is
`^[...]` whilst to obtain the last matching selection the syntax is `$[...]`.
`.^[selectionExpression]` whilst to obtain the last matching selection the syntax is
`.$[selectionExpression]`.
@ -1238,7 +1239,7 @@ first or the last value. To obtain the first entry matching the selection the sy
@@ -1238,7 +1239,7 @@ first or the last value. To obtain the first entry matching the selection the sy
=== Collection Projection
Projection allows a collection to drive the evaluation of a sub-expression and the
result is a new collection. The syntax for projection is `![projectionExpression]`. Most
result is a new collection. The syntax for projection is `.![projectionExpression]`. Most
easily understood by example, suppose we have a list of inventors but want the list of
cities where they were born. Effectively we want to evaluate 'placeOfBirth.city' for
every entry in the inventor list. Using projection:
@ -494,9 +494,9 @@ When the path location contains an Ant-style pattern, for example:
@@ -494,9 +494,9 @@ When the path location contains an Ant-style pattern, for example:
[subs="verbatim"]
----
/WEB-INF/*-context.xml
com/mycompany/**/applicationContext.xml
file:C:/some/path/*-context.xml
classpath:com/mycompany/**/applicationContext.xml
com/mycompany/**/applicationContext.xml
file:C:/some/path/*-context.xml
classpath:com/mycompany/**/applicationContext.xml
----
The resolver follows a more complex but defined procedure to try to resolve the
@ -512,7 +512,7 @@ the wildcards.
@@ -512,7 +512,7 @@ the wildcards.
===== Implications on portability
If the specified path is already a file URL (either explicitly, or implicitly because
the base `ResourceLoader` is a filesystem one, then wildcarding is guaranteed to work in
the base `ResourceLoader` is a filesystem one), then wildcarding is guaranteed to work in
a completely portable fashion.
If the specified path is a classpath location, then the resolver must obtain the last
@ -209,7 +209,7 @@ generation (including validation error display). It is never necessary to use th
@@ -209,7 +209,7 @@ generation (including validation error display). It is never necessary to use th
macros to generate form input fields, and they can be mixed and matched with simple HTML
or calls direct to the spring bind macros highlighted previously.
The following table of available macros show the VTL and FTL definitions and the
The following table of available macros show the FTL definitions and the
parameter list that each takes.
[[views-macros-defs-tbl]]
@ -262,9 +262,9 @@ parameter list that each takes.
@@ -262,9 +262,9 @@ parameter list that each takes.
| <@spring.showErrors separator, classOrStyle/>
|===
* In FTL (FreeMarker), these two macros are not actually required as you can use the
normal `formInput` macro, specifying ' `hidden`' or ' `password`' as the value for the
`fieldType` parameter.
* In FTL (FreeMarker), `formHiddenInput` and `formPasswordInput` are not actually required
as you can use the normal `formInput` macro, specifying `hidden` or `password` as the
value for the `fieldType` parameter.
The parameters to any of the above macros have consistent meanings:
@ -420,14 +420,14 @@ your model where they will be visible to your templates). The advantage of speci
@@ -420,14 +420,14 @@ your model where they will be visible to your templates). The advantage of speci
them in the templates is that they can be changed to different values later in the
template processing to provide different behavior for different fields in your form.
To switch to XHTML compliance for your tags, specify a value of 'true' for a
To switch to XHTML compliance for your tags, specify a value of `true` for a
model/context variable named xhtmlCompliant:
[source,jsp,indent=0]
[subs="verbatim,quotes"]
----
<#-- for FreeMarker -->
<#assign xhtmlCompliant = true in spring>
<#assign xhtmlCompliant = true>
----
Any tags generated by the Spring macros will now be XHTML compliant after processing
@ -435,12 +435,12 @@ this directive.
@@ -435,12 +435,12 @@ this directive.
In similar fashion, HTML escaping can be specified per field:
[source,xml,indent=0]
[source,jsp,indent=0]
[subs="verbatim,quotes"]
----
<#-- until this point, default HTML escaping is used -->
@ -479,7 +479,7 @@ initialization parameters ( `init-param` elements) to the Servlet declaration in
@@ -479,7 +479,7 @@ initialization parameters ( `init-param` elements) to the Servlet declaration in
All `HandlerMapping` implementations supports handler interceptors that are useful when
you want to apply specific functionality to certain requests, for example, checking for
a principal. Interceptors must implement `HandlerInterceptor` from the
`org.springframework.web.servlet` package with three methods that should provide enough
`org.springframework.web.servlet` package with three methods that should provide enough
flexibility to do all kinds of pre-processing and post-processing:
* `preHandle(..)` -- __before__ the actual handler is executed
@ -498,7 +498,7 @@ configure interceptors. You can also register them directly via setters on indiv
@@ -498,7 +498,7 @@ configure interceptors. You can also register them directly via setters on indiv
`HandlerMapping` implementations.
Note that `postHandle` is less useful with `@ResponseBody` and `ResponseEntity` methods for
which a the response is written and committed within the `HandlerAdapter` and before
which the response is written and committed within the `HandlerAdapter` and before
`postHandle`. That means its too late to make any changes to the response such as adding
an extra header. For such scenarios you can implement `ResponseBodyAdvice` and either
declare it as an <<mvc-ann-controller-advice>> bean or configure it directly on
@ -2543,8 +2543,8 @@ on a container object that specifies request headers and body. Below is an examp
@@ -2543,8 +2543,8 @@ on a container object that specifies request headers and body. Below is an examp
@PostMapping("/something")
public ResponseEntity<String> handle() {
// ...
URI location = ...
return new ResponseEntity.created(location).build();
URI location = ... ;
return ResponseEntity.created(location).build();
}
----
@ -4167,8 +4167,7 @@ And the same in XML use the `<mvc:view-controller>` element:
@@ -4167,8 +4167,7 @@ And the same in XML use the `<mvc:view-controller>` element:
The MVC config simplifies the registration of view resolvers.
The following is a Java config example that configures content negotiation view
resolution using FreeMarker HTML templates and Jackson as a default `View` for
JSON rendering:
resolution using JSP and Jackson as a default `View` for JSON rendering:
[source,java,indent=0]
[subs="verbatim,quotes"]
@ -4296,8 +4295,8 @@ See also
@@ -4296,8 +4295,8 @@ See also
<<mvc-caching-static-resources, HTTP caching support for static resources>>.
The resource handler also supports a chain of
{api-spring-framework}/web/servlet/resource/ResourceResolver.html[ResourceResolver]'s and