Package org.eclipse.jetty.xml

Examples of org.eclipse.jetty.xml.XmlConfiguration.configure()


                try
                {
                    localContextRoot.getRoot().addListener(listener);
                    XmlConfiguration configuration = new XmlConfiguration(jettyEnvXmlUrl);
                    configuration.configure(context);
                }
                finally
                {
                    localContextRoot.getRoot().removeListener(listener);
                    context.setAttribute(JETTY_ENV_BINDINGS,bindings);
View Full Code Here


            //apply a context xml file if one was supplied
            if (contextXml != null)
            {
                XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.toURL(contextXml));
                TaskLog.log("Applying context xml file "+contextXml);
                xmlConfiguration.configure(this);  
            }
           
            super.doStart();
        }
        catch (Exception e)
View Full Code Here

                        {
                            for (String cfg : _configFiles)
                            {
                                try (Resource resource = Resource.newResource(cfg)) {
                                    XmlConfiguration xmlConfiguration = new XmlConfiguration(resource.getURL());
                                    xmlConfiguration.configure(_server);
                                }
                            }
                        }

                        //check that everything got configured, and if not, make the handlers
View Full Code Here

                        if (!ctx.isDirectory() && ctx.toString().toLowerCase().endsWith(".xml"))
                        {
                            // It is a context config file
                            XmlConfiguration xmlConfiguration = new XmlConfiguration(ctx.getURL());
                            xmlConfiguration.getIdMap().put("Server", _server);
                            ContextHandler handler = (ContextHandler) xmlConfiguration.configure();
                            if (contextPathSet)
                                handler.setContextPath(contextPath);
                            _contexts.addHandler(handler);
                            handler.setAttribute("org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", __containerIncludeJarPattern);
                        }
View Full Code Here

                        context.removeAttribute(XML_CONFIGURATION);
                    }
                    setupXmlConfiguration(jetty_config, web_inf);
                    try
                    {
                        jetty_config.configure(context);
                    }
                    catch (ClassNotFoundException e)
                    {
                        LOG.warn("Unable to process jetty-web.xml", e);
                    }
View Full Code Here

        for (Resource template_xml : getLayeredResources(TEMPLATE_XML,template,node))
        {
            __log.debug("{}: template.xml={}",key,template_xml);
            XmlConfiguration xmlc = newXmlConfiguration(template_xml.getURL(),idMap,template,null);
            xmlc.getIdMap().putAll(idMap);
            xmlc.configure(shared);
            idMap=xmlc.getIdMap();
        }
       
        shared.setIdMap(idMap);
        shared.start();
View Full Code Here

                File file = resource.getFile();
                jettyXmlConfig.getIdMap().put("Server",app.getDeploymentManager().getServer());
                jettyXmlConfig.getProperties().put("jetty.webapp",file.getCanonicalPath());
                jettyXmlConfig.getProperties().put("jetty.webapps",file.getParentFile().getCanonicalPath());
               
                jettyXmlConfig.configure(context);
            }
            else
            {
                LOG.info("Binding: Unable to locate global webapp context settings: " + _jettyXml);
            }
View Full Code Here

            xmlc.getProperties().put("jetty.webapp",file.getCanonicalPath());
            xmlc.getProperties().put("jetty.webapps",file.getParentFile().getCanonicalPath());

            if (getConfigurationManager() != null)
                xmlc.getProperties().putAll(getConfigurationManager().getProperties());
            return (ContextHandler)xmlc.configure();
        }
        else if (file.isDirectory())
        {
            // must be a directory
        }
View Full Code Here

        if (contextXml != null)
        {
            File file = FileUtils.getFile(contextXml);
            XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.toURL(file));
            getLog().info("Applying context xml file "+contextXml);
            xmlConfiguration.configure(webApp);  
        }
       
        //If no contextPath was specified, go with default of project artifactid
        String cp = webApp.getContextPath();
        if (cp == null || "".equals(cp))
View Full Code Here

        if (xml != null)
        {
            if (xml.isDirectory() || !xml.toString().toLowerCase().endsWith(".xml"))
                error("Bad context.xml: "+xml);
            XmlConfiguration xmlConfiguration = new XmlConfiguration(xml.getURL());
            xmlConfiguration.configure(webapp);
        }
        webapp.setResourceBase(dir.getFile().getAbsolutePath());
        webapp.setPreconfigure(true);
        server.setHandler(webapp);
        server.start();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.