Examples of WebXml


Examples of org.apache.catalina.deploy.WebXml

    }

    @Override
    public void begin(String namespace, String name, Attributes attributes)
        throws Exception {
        WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1);
        String value = attributes.getValue("metadata-complete");
        if ("true".equals(value)) {
            webxml.setMetadataComplete(true);
        } else if ("false".equals(value)) {
            webxml.setMetadataComplete(false);
        }
        if (digester.getLogger().isDebugEnabled()) {
            digester.getLogger().debug
                (webxml.getClass().getName() + ".setMetadataComplete( " +
                        webxml.isMetadataComplete() + ")");
        }
    }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

    }

    @Override
    public void begin(String namespace, String name, Attributes attributes)
        throws Exception {
        WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1);
        webxml.setVersion(attributes.getValue("version"));
       
        if (digester.getLogger().isDebugEnabled()) {
            digester.getLogger().debug
                (webxml.getClass().getName() + ".setVersion( " +
                        webxml.getVersion() + ")");
        }
    }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

    }
   
    @Override
    public void begin(String namespace, String name, Attributes attributes)
            throws Exception {
        WebXml webXml = (WebXml) digester.peek(digester.getCount() - 1);
        // If we have a public ID, this is not a 2.4 or later webapp
        boolean havePublicId = (webXml.getPublicId() != null);
        // havePublicId and isServlet24OrLater should be mutually exclusive
        if (havePublicId == isServlet24OrLater) {
            throw new IllegalArgumentException(
                    "taglib definition not consistent with specification version");
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

            URL url = jarConn.getURL();
            URL resourceURL = jarConn.getJarFileURL();
            Jar jar = null;
            InputStream is = null;
            WebXml fragment = new WebXml();

            try {
                jar = JarFactory.newInstance(url);
                if (parseRequired || context.getXmlValidation()) {
                    is = jar.getInputStream(FRAGMENT_LOCATION);
                }

                if (is == null) {
                    // If there is no web-fragment.xml to process there is no
                    // impact on distributable
                    fragment.setDistributable(true);
                } else {
                    InputSource source = new InputSource(
                            "jar:" + resourceURL.toString() + "!/" +
                            FRAGMENT_LOCATION);
                    source.setByteStream(is);
                    parseWebXml(source, fragment, true);
                }
            } finally {
                if (jar != null) {
                    jar.close();
                }
                fragment.setURL(url);
                if (fragment.getName() == null) {
                    fragment.setName(fragment.getURL().toString());
                }
                fragment.setJarName(extractJarFileName(url));
                fragments.put(fragment.getName(), fragment);
            }
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

        @Override
        public void scan(File file) throws IOException {

            InputStream stream = null;
            WebXml fragment = new WebXml();

            try {
                File fragmentFile = new File(file, FRAGMENT_LOCATION);
                if (fragmentFile.isFile()) {
                    stream = new FileInputStream(fragmentFile);
                    InputSource source =
                        new InputSource(fragmentFile.toURI().toURL().toString());
                    source.setByteStream(stream);
                    parseWebXml(source, fragment, true);
                } else {
                    // If there is no web.xml, normal folder no impact on
                    // distributable
                    fragment.setDistributable(true);
                }
            } finally {
                fragment.setURL(file.toURI().toURL());
                if (fragment.getName() == null) {
                    fragment.setName(fragment.getURL().toString());
                }
                fragment.setJarName(file.getName());
                fragments.put(fragment.getName(), fragment);
            }
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

    }
   
    @Override
    public void begin(String namespace, String name, Attributes attributes)
            throws Exception {
        WebXml webXml = (WebXml) digester.peek(digester.getCount() - 1);
        // If we have a public ID, this is not a 2.4 or later webapp
        boolean havePublicId = (webXml.getPublicId() != null);
        // havePublicId and isServlet24OrLater should be mutually exclusive
        if (havePublicId == isServlet24OrLater) {
            throw new IllegalArgumentException(
                    "taglib definition not consistent with specification version");
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

            URL url = jarConn.getURL();
            URL resourceURL = jarConn.getJarFileURL();
            Jar jar = null;
            InputStream is = null;
            WebXml fragment = new WebXml();

            try {
                jar = JarFactory.newInstance(url);
                is = jar.getInputStream(FRAGMENT_LOCATION);

                if (is == null) {
                    // If there is no web.xml, normal JAR no impact on
                    // distributable
                    fragment.setDistributable(true);
                } else {
                    InputSource source = new InputSource(
                            resourceURL.toString() + "!/" + FRAGMENT_LOCATION);
                    source.setByteStream(is);
                    parseWebXml(source, fragment, true);
                }
            } finally {
                if (is != null) {
                    try {
                        is.close();
                    } catch (IOException ioe) {
                        // Ignore
                    }
                }
                if (jar != null) {
                    jar.close();
                }
                fragment.setURL(url);
                if (fragment.getName() == null) {
                    fragment.setName(fragment.getURL().toString());
                }
                fragments.put(fragment.getName(), fragment);
            }
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

        @Override
        public void scan(File file) throws IOException {

            InputStream stream = null;
            WebXml fragment = new WebXml();

            try {
                File fragmentFile = new File(file, FRAGMENT_LOCATION);
                if (fragmentFile.isFile()) {
                    stream = new FileInputStream(fragmentFile);
                    InputSource source =
                        new InputSource(fragmentFile.toURI().toURL().toString());
                    source.setByteStream(stream);
                    parseWebXml(source, fragment, true);
                }
            } finally {
                if (stream != null) {
                    try {
                        stream.close();
                    } catch (Throwable t) {
                        ExceptionUtils.handleThrowable(t);
                    }
                }
                fragment.setURL(file.toURI().toURL());
                if (fragment.getName() == null) {
                    fragment.setName(fragment.getURL().toString());
                }
                fragments.put(fragment.getName(), fragment);
            }
        }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

    }

    @Override
    public void begin(String namespace, String name, Attributes attributes)
        throws Exception {
        WebXml webXml = (WebXml) digester.peek();
        webXml.setDistributable(true);
        if (digester.getLogger().isDebugEnabled()) {
            digester.getLogger().debug
               (webXml.getClass().getName() + ".setDistributable(true)");
        }
    }
View Full Code Here

Examples of org.apache.catalina.deploy.WebXml

    }

    @Override
    public void begin(String namespace, String name, Attributes attributes)
        throws Exception {
        WebXml webxml = (WebXml) digester.peek(digester.getCount() - 1);
        String value = attributes.getValue("metadata-complete");
        if ("true".equals(value)) {
            webxml.setMetadataComplete(true);
        } else if ("false".equals(value)) {
            webxml.setMetadataComplete(false);
        }
        if (digester.getLogger().isDebugEnabled()) {
            digester.getLogger().debug
                (webxml.getClass().getName() + ".setMetadataComplete( " +
                        webxml.isMetadataComplete() + ")");
        }
    }
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.