Package org.apache.tomcat

Examples of org.apache.tomcat.JarScanner


        if (initialized) return;
        try {
            tldScanWebXml();
            tldScanResourcePaths(WEB_INF);
           
            JarScanner jarScanner = JarScannerFactory.getJarScanner(ctxt);
            if (jarScanner != null) {
                jarScanner.scan(ctxt,
                        Thread.currentThread().getContextClassLoader(),
                        new TldJarScannerCallback(), noTldJars);
            }

            initialized = true;
View Full Code Here


    /**
     * Scan for TLDs in JARs in /WEB-INF/lib.
     */
    public void scanJars() {
        JarScanner scanner = JarScannerFactory.getJarScanner(context);
        TldScannerCallback callback = new TldScannerCallback();
        scanner.scan(JarScanType.TLD, context, callback);
        if (callback.scanFoundNoTLDs()) {
            log.info(Localizer.getMessage("jsp.tldCache.noTldSummary"));
        }
    }
View Full Code Here

     *
     * @return A map of JAR name to processed web fragment (if any)
     */
    protected Map<String,WebXml> processJarsForWebFragments(WebXml application) {

        JarScanner jarScanner = context.getJarScanner();
        boolean delegate = false;
        if (context instanceof StandardContext) {
            delegate = ((StandardContext) context).getDelegate();
        }
        boolean parseRequired = true;
        Set<String> absoluteOrder = application.getAbsoluteOrdering();
        if (absoluteOrder != null && absoluteOrder.isEmpty() &&
                !context.getXmlValidation()) {
            // Skip parsing when there is an empty absolute ordering and
            // validation is not enabled
            parseRequired = false;
        }
        FragmentJarScannerCallback callback =
                new FragmentJarScannerCallback(webXmlParser, delegate, parseRequired);

        jarScanner.scan(JarScanType.PLUGGABILITY,
                context.getServletContext(), callback);

        if (!callback.isOk()) {
            ok = false;
        }
View Full Code Here

       
        // Stage 3a - TLDs under WEB-INF (not lib or classes)
        tldScanResourcePaths(WEB_INF);

        // Stages 3b & 4
        JarScanner jarScanner = context.getJarScanner();
        jarScanner.scan(context.getServletContext(),
                context.getLoader().getClassLoader(),
                new TldJarScannerCallback(), noTldJars);
       
        // Now add all the listeners we found to the listeners for this context
        String list[] = getTldListeners();
View Full Code Here

     *
     * @return A map of JAR name to processed web fragment (if any)
     */
    protected Map<String,WebXml> processJarsForWebFragments(WebXml application) {

        JarScanner jarScanner = context.getJarScanner();

        boolean parseRequired = true;
        Set<String> absoluteOrder = application.getAbsoluteOrdering();
        if (absoluteOrder != null && absoluteOrder.isEmpty() &&
                !context.getXmlValidation()) {
            // Skip parsing when there is an empty absolute ordering and
            // validation is not enabled
            parseRequired = false;
        }

        FragmentJarScannerCallback callback =
                new FragmentJarScannerCallback(parseRequired);

        jarScanner.scan(context.getServletContext(),
                context.getLoader().getClassLoader(), callback,
                pluggabilityJarsToSkip);

        return callback.getFragments();
    }
View Full Code Here

        context.setParent(host);
        context.setDocBase(location);
        context.setPath(mount);
        context.addLifecycleListener(new ContextConfig());

        JarScanner jarScanner = context.getJarScanner();
        if (jarScanner instanceof StandardJarScanner) {
            StandardJarScanner standardJarScanner = (StandardJarScanner) jarScanner;
            standardJarScanner.setScanClassPath(false);
        }
View Full Code Here

        if (initialized) return;
        try {
            tldScanWebXml();
            tldScanResourcePaths(WEB_INF);
           
            JarScanner jarScanner = JarScannerFactory.getJarScanner(ctxt);
            if (jarScanner != null) {
                jarScanner.scan(ctxt,
                        Thread.currentThread().getContextClassLoader(),
                        new TldJarScannerCallback(), noTldJars);
            }

            initialized = true;
View Full Code Here

        factory.setPort(config.getPort());
        factory.setSessionTimeout(10, TimeUnit.MINUTES);
        factory.addContextCustomizers(new TomcatContextCustomizer() {
            @Override
            public void customize(Context context) {
                JarScanner jarScanner = new JarScanner() {
                    @Override
                    public void scan(ServletContext arg0, ClassLoader arg1,
                                     JarScannerCallback arg2, Set<String> arg3) {
                    }
                };
View Full Code Here

        factory.setPort(config.getPort());
        factory.setSessionTimeout(10, TimeUnit.MINUTES);
        factory.addContextCustomizers(new TomcatContextCustomizer() {
            @Override
            public void customize(Context context) {
                JarScanner jarScanner = new JarScanner() {
                    @Override
                    public void scan(ServletContext arg0, ClassLoader arg1,
                                     JarScannerCallback arg2, Set<String> arg3) {
                    }
                };
View Full Code Here

        factory.setSessionTimeout(10, TimeUnit.MINUTES);
        factory.addAdditionalTomcatConnectors(createSslConnector());
        factory.addContextCustomizers(new TomcatContextCustomizer() {
            @Override
            public void customize(Context context) {
                JarScanner jarScanner = new JarScanner() {
                    @Override
                    public void scan(ServletContext context, ClassLoader loader,
                                     JarScannerCallback scannerCallback, Set<String> args) {
                    }
                };
View Full Code Here

TOP

Related Classes of org.apache.tomcat.JarScanner

Copyright © 2018 www.massapicom. 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.