0

zk upgrade to 9.6.0.2

asked 2023-01-18 00:36:42 +0800

mthapa gravatar image mthapa
1

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>

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-01-20 16:25:55 +0800

MDuchemin gravatar image MDuchemin
2295 1 6
ZK Team

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?

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2023-01-18 00:36:42 +0800

Seen: 9 times

Last updated: Jan 20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More