Class Headers
java.lang.Object
ch.tocco.nice2.optional.cms.impl.publish.output.freemarker.header.Headers
Represents a collection of HTTP header entries.
This object is added to the page model and available in the templates during the render process.
It can be used to add headers to the server response from a template.
-
Constructor Details
-
Headers
public Headers()
-
-
Method Details
-
set
Set a header.- Parameters:
name
- The name of the header.- Returns:
- an empty string. If we returned nothing or null, we would have to handle it in the template.
-
get
Get a header value.- Parameters:
name
- The name of the header.- Returns:
- the value of the header or null.
-
has
Determine if a header is set.- Parameters:
name
- The name of the header.- Returns:
- true, if the header exists, else false.
-
noCache
Set the "Cache-Control" header to "no-cache".- Returns:
- an empty string. If we returned nothing or null, we would have to handle it in the template.
-
iterator
-