Package org.tuckey.web.filters.urlrewrite

Examples of org.tuckey.web.filters.urlrewrite.Conf


        if (document == null) {
            logger.error("creating rules document failed");
            return;
        }

        final Conf conf = new DocumentConf(document);
        conf.initialise();
        clearRewriter();

        if (conf.isOk()) {
            logger.info("rewrite configuration is ok");
        } else {
            logger.error("rewrite configuration is NOT ok");
            return;
        }

        rewriter = new UrlRewriter(conf);
        logger.info("rewrite engine is enabled: {}", conf.isEngineEnabled());
        if (conf.getRules() != null) {
            logger.info("number of rewrite rules: {}", conf.getRules().size());
        } else {
            logger.info("no rewrite rules");
        }
    }
View Full Code Here


            urlRewriter = null;
         }

      }
      else {
         Conf conf = new Conf(context, inputStream, confPath, confUrlStr, false);
         checkConfLocal(conf);
      }
   }
View Full Code Here

                    throw new IOException("Cannot load mod rewrite config file: " + modRewriteConfFile);
                }
                try {
                    String text = camelContext.getTypeConverter().mandatoryConvertTo(String.class, is);
                    ModRewriteConfLoader loader = new ModRewriteConfLoader();
                    conf = new Conf();
                    loader.process(text, conf);
                } finally {
                    IOHelper.close(is);
                }
            } else if (modRewriteConfText != null) {
                LOG.debug("Using modRewriteConfText: {} as config for urlRewrite", modRewriteConfText);
                ModRewriteConfLoader loader = new ModRewriteConfLoader();
                conf = new Conf();
                loader.process(modRewriteConfText, conf);
            } else if (configFile != null) {
                LOG.debug("Using config file: {} as config for urlRewrite", configFile);
                InputStream is = camelContext.getClassResolver().loadResourceAsStream(configFile);
                if (is == null) {
                    throw new IOException("Cannot load config file: " + configFile);
                }
                try {
                    conf = new Conf(is, configFile);
                } finally {
                    IOHelper.close(is);
                }
            }
            if (conf != null) {
View Full Code Here

TOP

Related Classes of org.tuckey.web.filters.urlrewrite.Conf

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.