-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Anyone can please suggest how to resolve this error: java.lang.ClassCastException: org.zkoss.zk.ui.http.DHtmlLayoutServlet cannot be cast to javax.servlet.Servlet
I am processing the upgrade of zk 6.5.2 to zk 9.6.0.2 my pom <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <version>3.0.1</version> <scope>compile</scope> <optional>true</optional> </dependency>
my web.xml
<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>
Hi there!
The first thing you'll need to check is which ZK version and which webserver you are running. Recent ZK versions have both a "standard" and "-JAKARTA" release. The Jakarta release should be used with webservers which support Jakarta.
For example, Tomcat 10 supports Jakarta (not java) servlet spec.
Same goes for the servlet API functional level used in your project. If you are using a web server with the Jakarta servlet spec, you should use the Jakarta servlet API
Can you provide your current (full) ZK version string, and the web-server which you are using to verify that they are compatible?
Asked: 2023-01-18 00:36:42 +0800
Seen: 12 times
Last updated: Jan 20