ZK Filter

From Documentation


[Optional] Class: DHtmlLayoutFilter

ZK Filter is a filter to post-process the output generated by other servlets, such as JSP pages. Its role is similar to the ZK Loader. Unlike the ZK Loader, which loads static ZUML pages from Web applications directly, the ZK filter is designed to process dynamic pages generated by other servlets, say JSP or JSF. It enables developers to add rich user interfaces to existent servlets written in any technology.

Note: the output must be in XHTML (or ZUML) syntax. If you encounter any problem, you can save the generated output into a ZHTML page and then browse the URL whether the ZHTML page is stored.

The Initial Parameters

extension [Optional][Default: html]

It specifies how to process the response generated by other servlets.

If html or zhtml, XHTML is assumed to be the default namespace. If xul or zul, XUL is assumed to be the default namespace.

charset [Optional][Default: UTF-8]

It specifies the default charset for the output of this filter.

If an empty string is specified as follows, the container's default is used. In other words, the setCharacterEncoding method of javax.servlet.ServletResponse is not called.

compress [Optional][Default: true]

It specifies whether to compress the output if the browser supports the compression (Accept-Encoding) and this filter is not included by other Servlets.

Map URL to ZK Filter

ZK Filter can be mapped to any servlet or JSP page you want. For example,


Version History

Version Date Content

Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.