diff --git a/examples/async-rest/async-rest-jar/src/main/resources/META-INF/web-fragment.xml b/examples/async-rest/async-rest-jar/src/main/resources/META-INF/web-fragment.xml index 9876d9983bf..559eeafb457 100644 --- a/examples/async-rest/async-rest-jar/src/main/resources/META-INF/web-fragment.xml +++ b/examples/async-rest/async-rest-jar/src/main/resources/META-INF/web-fragment.xml @@ -1,4 +1,10 @@ - + + + SerialRestServlet SerialRestServlet @@ -19,4 +25,4 @@ AsyncRestServlet /testAsync - \ No newline at end of file + diff --git a/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/web.xml b/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/web.xml index 8916bdb6afa..c674332aeb0 100644 --- a/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/web.xml +++ b/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/web.xml @@ -1,8 +1,8 @@ - + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" + version="3.1"> Async REST Webservice Example diff --git a/jetty-webapp/src/main/config/etc/webdefault.xml b/jetty-webapp/src/main/config/etc/webdefault.xml index 61b31ed4965..3ee21fdb921 100644 --- a/jetty-webapp/src/main/config/etc/webdefault.xml +++ b/jetty-webapp/src/main/config/etc/webdefault.xml @@ -526,7 +526,7 @@ Enable everything but TRACE / - TRACE + TRACE diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebDescriptor.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebDescriptor.java index 4b65a819f1b..88f7c372d6e 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebDescriptor.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebDescriptor.java @@ -72,25 +72,38 @@ public class WebDescriptor extends Descriptor URL dtd22=Loader.getResource(Servlet.class,"javax/servlet/resources/web-app_2_2.dtd"); URL dtd23=Loader.getResource(Servlet.class,"javax/servlet/resources/web-app_2_3.dtd"); URL j2ee14xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/j2ee_1_4.xsd"); + URL javaee5=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_5.xsd"); + URL javaee6=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_6.xsd"); + URL javaee7=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_7.xsd"); + URL webapp24xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/web-app_2_4.xsd"); URL webapp25xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/web-app_2_5.xsd"); URL webapp30xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/web-app_3_0.xsd"); URL webcommon30xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/web-common_3_0.xsd"); URL webfragment30xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/web-fragment_3_0.xsd"); + URL webapp31xsd=Loader.getResource(Servlet.class, "javax/servlet/resources/web-app_3_1.xsd"); + URL webcommon31xsd=Loader.getResource(Servlet.class, "javax/servlet/resources/web-common_3_1.xsd"); + URL webfragment31xsd=Loader.getResource(Servlet.class, "javax/servlet/resources/web-fragment_3_1.xsd"); URL schemadtd=Loader.getResource(Servlet.class,"javax/servlet/resources/XMLSchema.dtd"); URL xmlxsd=Loader.getResource(Servlet.class,"javax/servlet/resources/xml.xsd"); URL webservice11xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/j2ee_web_services_client_1_1.xsd"); URL webservice12xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_web_services_client_1_2.xsd"); + URL webservice13xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_web_services_client_1_3.xsd"); + URL webservice14xsd=Loader.getResource(Servlet.class,"javax/servlet/resources/javaee_web_services_client_1_4.xsd"); URL datatypesdtd=Loader.getResource(Servlet.class,"javax/servlet/resources/datatypes.dtd"); URL jsp20xsd = null; URL jsp21xsd = null; + URL jsp22xsd = null; + URL jsp23xsd = null; try { - Class jsp_page = Loader.loadClass(WebXmlConfiguration.class, "javax.servlet.jsp.JspPage"); - jsp20xsd = jsp_page.getResource("/javax/servlet/resources/jsp_2_0.xsd"); - jsp21xsd = jsp_page.getResource("/javax/servlet/resources/jsp_2_1.xsd"); + //try both javax/servlet/resources and javax/servlet/jsp/resources to load + jsp20xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_0.xsd"); + jsp21xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_1.xsd"); + jsp22xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_2.xsd"); + jsp23xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_3.xsd"); } catch (Exception e) { @@ -98,8 +111,10 @@ public class WebDescriptor extends Descriptor } finally { - if (jsp20xsd == null) jsp20xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_0.xsd"); - if (jsp21xsd == null) jsp21xsd = Loader.getResource(Servlet.class, "javax/servlet/resources/jsp_2_1.xsd"); + if (jsp20xsd == null) jsp20xsd = Loader.getResource(Servlet.class, "javax/servlet/jsp/resources/jsp_2_0.xsd"); + if (jsp21xsd == null) jsp21xsd = Loader.getResource(Servlet.class, "javax/servlet/jsp/resources/jsp_2_1.xsd"); + if (jsp22xsd == null) jsp22xsd = Loader.getResource(Servlet.class, "javax/servlet/jsp/resources/jsp_2_2.xsd"); + if (jsp23xsd == null) jsp23xsd = Loader.getResource(Servlet.class, "javax/servlet/jsp/resources/jsp_2_3.xsd"); } redirect(xmlParser,"web-app_2_2.dtd",dtd22); @@ -113,8 +128,15 @@ public class WebDescriptor extends Descriptor redirect(xmlParser,"jsp_2_0.xsd",jsp20xsd); redirect(xmlParser,"http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd",jsp20xsd); redirect(xmlParser,"http://java.sun.com/xml/ns/javaee/jsp_2_1.xsd",jsp21xsd); + redirect(xmlParser,"jsp_2_2.xsd",jsp22xsd); + redirect(xmlParser,"http://java.sun.com/xml/ns/javaee/jsp_2_2.xsd",jsp22xsd); + redirect(xmlParser,"jsp_2_3.xsd",jsp23xsd); + redirect(xmlParser,"http://xmlns.jcp.org/xml/ns/javaee/jsp_2_3.xsd",jsp23xsd); redirect(xmlParser,"j2ee_1_4.xsd",j2ee14xsd); redirect(xmlParser,"http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd",j2ee14xsd); + redirect(xmlParser, "http://java.sun.com/xml/ns/javaee/javaee_5.xsd",javaee5); + redirect(xmlParser, "http://java.sun.com/xml/ns/javaee/javaee_6.xsd",javaee6); + redirect(xmlParser, "http://xmlns.jcp.org/xml/ns/javaee/javaee_7.xsd",javaee7); redirect(xmlParser,"web-app_2_4.xsd",webapp24xsd); redirect(xmlParser,"http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd",webapp24xsd); redirect(xmlParser,"web-app_2_5.xsd",webapp25xsd); @@ -125,14 +147,25 @@ public class WebDescriptor extends Descriptor redirect(xmlParser,"http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd",webcommon30xsd); redirect(xmlParser,"web-fragment_3_0.xsd",webfragment30xsd); redirect(xmlParser,"http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd",webfragment30xsd); + redirect(xmlParser,"web-app_3_1.xsd",webapp31xsd); + redirect(xmlParser,"http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd",webapp31xsd); + redirect(xmlParser,"web-common_3_1.xsd",webcommon30xsd); + redirect(xmlParser,"http://xmlns.jcp.org/xml/ns/javaee/web-common_3_1.xsd",webcommon31xsd); + redirect(xmlParser,"web-fragment_3_1.xsd",webfragment30xsd); + redirect(xmlParser,"http://xmlns.jcp.org/xml/ns/javaee/web-fragment_3_1.xsd",webfragment31xsd); redirect(xmlParser,"xml.xsd",xmlxsd); redirect(xmlParser,"http://www.w3.org/2001/xml.xsd",xmlxsd); redirect(xmlParser,"datatypes.dtd",datatypesdtd); redirect(xmlParser,"http://www.w3.org/2001/datatypes.dtd",datatypesdtd); redirect(xmlParser,"j2ee_web_services_client_1_1.xsd",webservice11xsd); redirect(xmlParser,"http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd",webservice11xsd); - redirect(xmlParser,"javaee_web_services_client_1_2.xsd",webservice12xsd); + redirect(xmlParser,"javaee_web_services_client_1_2.xsd",webservice12xsd); redirect(xmlParser,"http://www.ibm.com/webservices/xsd/javaee_web_services_client_1_2.xsd",webservice12xsd); + redirect(xmlParser,"javaee_web_services_client_1_3.xsd",webservice13xsd); + redirect(xmlParser,"http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_3.xsd",webservice13xsd); + redirect(xmlParser,"javaee_web_services_client_1_4.xsd",webservice14xsd); + redirect(xmlParser,"http://xmlns.jcp.org/xml/ns/javaee/javaee_web_services_client_1_4.xsd",webservice14xsd); + return xmlParser; } diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.d/override-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.d/override-web.xml index 3ff762a9761..e7b98aab42d 100644 --- a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.d/override-web.xml +++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/webapps/test.d/override-web.xml @@ -1,9 +1,9 @@ + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" + version="3.1">