Sample of web.xml for Servlet 3.0"
From Documentation
m (ZK 6) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ZKInstallationGuidePageHeader}} | {{ZKInstallationGuidePageHeader}} | ||
− | + | {{versionSince| 6.0.0}} | |
− | ZK | + | ZK supports Servlet 3.0 Pluggability, so you don't have to configure ZK's servlets and listeners in <code>WEB-INF/web.xml</code> at all. (Make sure you include [https://mavensync.zkoss.org/eval/org/zkoss/zk/zkwebfragment/ zkwebfragment.jar]) |
<source lang="xml"> | <source lang="xml"> | ||
Line 16: | Line 16: | ||
On the other hand, if <code>metadata-complete=“true”</code> was specified in <code>WEB-INF/web.xml</code> (i.e., the support of pluggability is disabled), you have to configure ZK servlets and listeners manually as described in [[ZK Installation Guide/ZK Background/Sample of web.xml for Servlet 2.4|the Sample of web.xml for Servlet 2.4]]. | On the other hand, if <code>metadata-complete=“true”</code> was specified in <code>WEB-INF/web.xml</code> (i.e., the support of pluggability is disabled), you have to configure ZK servlets and listeners manually as described in [[ZK Installation Guide/ZK Background/Sample of web.xml for Servlet 2.4|the Sample of web.xml for Servlet 2.4]]. | ||
− | + | ||
{{LastUpdated}} | {{LastUpdated}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{ZKInstallationGuidePageFooter}} | {{ZKInstallationGuidePageFooter}} |
Latest revision as of 02:33, 13 December 2022
Since 6.0.0
ZK supports Servlet 3.0 Pluggability, so you don't have to configure ZK's servlets and listeners in WEB-INF/web.xml
at all. (Make sure you include zkwebfragment.jar)
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<description><![CDATA[My ZK Application]]></description>
<display-name>MyApp</display-name>
</web-app>
On the other hand, if metadata-complete=“true”
was specified in WEB-INF/web.xml
(i.e., the support of pluggability is disabled), you have to configure ZK servlets and listeners manually as described in the Sample of web.xml for Servlet 2.4.