-
FEATURED COMPONENTS
First time here? Check out the FAQ!
We are trying to upgrade existing webapp from ZK 6.5.4 to ZK 8.6.0 under WebSphere 8.5.5.12. As WebSphere 8.5.5 support servlet 3.0, we upgraded web.xml version and the following ZK servlet config:
<servlet>
<description>
The ZK loader for ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class>
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>
The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
However, Eclipse cannot build the project with the following errors:
Please advise the settings need to upgrade ZK to support servlet 3.0. Thanks.
Since you didn't post your whole web.xml or the complete maven dependencies you are using, I assume your server finds both configurations the one you provide in your web.xml and the one already included in zk, since 8.6.0 in the zkwebfragment
dependency
https://mavensync.zkoss.org/maven2/org/zkoss/zk/zkwebfragment/
In order to fix those "duplicate URL mapping ..." errors, you have pick only one configuration method.
Either leave the configuration out of your web.xml:
Or specify metadata-complete="true"
to prevent the server from scanning for webfragments.
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true"
>
Or 3rd:
exclude the maven dependency for webfragment
(possible since 8.6.0)
Asked: 2019-10-03 18:23:54 +0800
Seen: 8 times
Last updated: Oct 28 '19