diff --git a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartGeneratorConfiguration.java b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartGeneratorConfiguration.java index 5b88d118f18..27e725b0b12 100644 --- a/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartGeneratorConfiguration.java +++ b/jetty-quickstart/src/main/java/org/eclipse/jetty/quickstart/QuickStartGeneratorConfiguration.java @@ -172,11 +172,13 @@ public class QuickStartGeneratorConfiguration extends AbstractConfiguration MetaData md = context.getMetaData(); Map webappAttr = new HashMap<>(); + int major = context.getServletContext().getEffectiveMajorVersion(); + int minor = context.getServletContext().getEffectiveMinorVersion(); webappAttr.put("xmlns","http://xmlns.jcp.org/xml/ns/javaee"); webappAttr.put("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"); - webappAttr.put("xsi:schemaLocation","http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"); + webappAttr.put("xsi:schemaLocation","http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_"+(major+"_"+minor)+".xsd"); webappAttr.put("metadata-complete","true"); - webappAttr.put("version",context.getServletContext().getEffectiveMajorVersion()+"."+context.getServletContext().getEffectiveMinorVersion()); + webappAttr.put("version",major+"."+minor); out.openTag("web-app",webappAttr); if (context.getDisplayName() != null)