private void configure(WebConfig config, Element e) throws InvalidConfigException {
        if (config == null || e == null) {
            return;
        }
        String name = e.getName();
        if (DEFAULT_PAGE.equals(name)) {
            if (e.attribute("value") == null) {
                throw new InvalidConfigException(errorMsg("value", DEFAULT_PAGE));
            }
            config.setDefaultPage(e.attribute("value").getValue());
        } else if (RESOURCES.equals(name)) {
            if (e.attribute("path") == null) {
                throw new InvalidConfigException(errorMsg("path", RESOURCES));
            }
            config.setResourcePath(e.attribute("path").getValue());
        } else if (TEMPLATES.equals(name)) {
            if (e.attribute("path") == null) {
                throw new InvalidConfigException(errorMsg("path", TEMPLATES));
            }
            config.setTemplatePath(e.attribute("path").getValue());
        } else if (ACTIONS.equals(name)) {
            if (e.attribute("package") == null) {
                throw new InvalidConfigException(errorMsg("package", ACTIONS));
            }
            config.setActionPackage(e.attribute("package").getValue());
        } else if (TOOLS.equals(name)) {
            List<Element> elements = e.elements();
            for (Element e1 : elements) {
                configure(config, e1);
            }
        } else if (TOOL.equals(name)) {
            if (e.attribute("id") == null || e.attribute("class") == null) {
                throw new InvalidConfigException(errorMsg("id and class", TOOL));
            }
            try {
                Class clazz = Class.forName(e.attribute("class").getValue());
                config.registerTool(e.attribute("id").getValue(), clazz.newInstance());
            } catch (Throwable t) {
                throw new InvalidConfigException("Init tool failed!", t);
            }
        } else if (SPRING_SUPPORT.equals(name)) {
            if (e.attribute("value") == null) {
                throw new InvalidConfigException(errorMsg("value", SPRING_SUPPORT));
            }
            if ("true".equals(e.attribute("value").getValue())) {
                config.setSpringSupported(true);
                List<Element> elements = e.elements();
                for (Element e2 : elements) {
                    configure(config, e2);
                }
            }
        } else if (SPRING_IMPORT.equals(name)) {
            if (e.attribute("path") == null) {
                throw new InvalidConfigException(errorMsg("path", SPRING_IMPORT));
            }
            config.addBeanFilePath(e.attribute("path").getValue());
        } else if (VELOCITY_SUPPORT.equals(name)) {
            if (e.attribute("config-file") == null) {
                throw new InvalidConfigException(errorMsg("config-file", VELOCITY_SUPPORT));
            }
            config.setVelocityConfigFilePath(e.attribute("config-file").getValue());
        }
    }
Parse website configure file information

@return    the website configure object
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/simplemvc/conf/ConfigFileParser.java