0

Jetty 9 and ZK 7.0.2 don't work with web.xml version 2.5, 3.0 and 3.1

asked 2014-12-21 16:42:13 +0800

sirlordt gravatar image sirlordt
16 1

updated 2014-12-21 16:49:51 +0800

Hi trying to run basic project created by eclipse luna with ZK Studio 2.0.1.v20131209 the default web.xml created

<web-app xmlns:xsi="&lt;a href=" http:="" www.w3.org="" 2001="" xmlschema-instance"="">http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

I exported the project to .war file to jetty-distribution-9.2.6.v20141205/webapps

and the console run java -jar start.jar from jetty-distribution-9.2.6.v20141205 i get the next error:

2014-12-21 11:55:20.001:INFO::main: Logging initialized @1451ms 2014-12-21 11:55:20.230:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html 2014-12-21 11:55:20.526:INFO:oejs.Server:main: jetty-9.2.6.v20141205 2014-12-21 11:55:20.578:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/media/datos/sirlordt/Escritorio/jetty-distribution-9.2.6.v20141205/webapps/] at interval 1 2014-12-21 11:55:22.324:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.servlet.ServletHandler@6d20ec1b: java.lang.IllegalStateException: Multiple servlets map to path: /zkau/: DHtmlUpdateServlet,auEngine java.lang.IllegalStateException: Multiple servlets map to path: /zkau/: DHtmlUpdateServlet,auEngine at org.eclipse.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:1488) at org.eclipse.jetty.servlet.ServletHandler.doStart(ServletHandler.java:160) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:391) ...

For fix this problem i changed the line on web.xml

<web-app xmlns:xsi="&lt;a href=" http:="" www.w3.org="" 2001="" xmlschema-instance"="">http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID" version="2.4">

I changed version="3.0" to version="2.4" And xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd (http://java.sun.com/xml/ns/javaee/web-app30.xsd)" to xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd (http://java.sun.com/xml/ns/j2ee/web-app24.xsd)"

I exported the project to .war file to jetty-distribution-9.2.6.v20141205/webapps and now working.

delete flag offensive retag edit
Be the first one to answer this question!
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: 2014-12-21 16:42:13 +0800

Seen: 8 times

Last updated: Dec 21 '14

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