/** * Configures some well-known properties before the XmlConfiguration reads * the configuration. * @param jetty_config The configuration object. * @param web_inf the WEB-INF location */ private void setupXmlConfiguration(WebAppContext context, XmlConfiguration jetty_config, Resource web_inf) throws IOException { jetty_config.setJettyStandardIdsAndProperties(context.getServer(),null); Map<String,String> props = jetty_config.getProperties(); props.put(PROPERTY_THIS_WEB_INF_URL, web_inf.getURI().toString()); props.put(PROPERTY_WEB_INF_URI, XmlConfiguration.normalizeURI(web_inf.getURI().toString())); props.put(PROPERTY_WEB_INF, web_inf.toString()); } }
public void scope(XmlConfiguration xmlc, Resource webapp) throws IOException { xmlc.setJettyStandardIdsAndProperties(getServer(),webapp); } }
/** * Configures some well-known properties before the XmlConfiguration reads * the configuration. * @param jetty_config The configuration object. * @param web_inf the WEB-INF location */ private void setupXmlConfiguration(WebAppContext context, XmlConfiguration jetty_config, Resource web_inf) throws IOException { jetty_config.setJettyStandardIdsAndProperties(context.getServer(),null); Map<String,String> props = jetty_config.getProperties(); props.put(PROPERTY_THIS_WEB_INF_URL, web_inf.getURI().toString()); props.put(PROPERTY_WEB_INF_URI, XmlConfiguration.normalizeURI(web_inf.getURI().toString())); props.put(PROPERTY_WEB_INF, web_inf.toString()); } }
configuration.setJettyStandardIdsAndProperties(context.getServer(), null); WebAppClassLoader.runWithServerClassAccess(()->{configuration.configure(context);return null;});