Package org.apache.portals.applications.webcontent.proxy.impl

Examples of org.apache.portals.applications.webcontent.proxy.impl.DefaultReverseProxyLinkRewritingParserAdaptor


        ReverseProxyRewritingContext rewritingContext =
            new DefaultReverseProxyRewritingContext(proxyPathMapperProvider.findMapper("/www_apache/index.html"),
                                                    proxyPathMapperProvider,
                                                    "/webcontent/rproxy");
       
        DefaultReverseProxyLinkRewritingParserAdaptor parserAdaptor = new DefaultReverseProxyLinkRewritingParserAdaptor();
        parserAdaptor.setReverseProxyRewritingContext(rewritingContext);
       
        parserAdaptor.setLookUpAllMappings(false);
        BeanUtils.setProperty(parserAdaptor, "lookUpAllMappings", new String [] { "true" });
        assertTrue(parserAdaptor.getLookUpAllMappings());
        BeanUtils.setProperty(parserAdaptor, "customPatterns", new String [] { "\\/lazyLoader" });
        BeanUtils.setProperty(parserAdaptor, "customReplaces", new String [] { "/busyLoader" });
       
        StringReader reader = new StringReader(html);
        StringWriter writer = new StringWriter();
        parserAdaptor.rewrite(null, reader, writer);
       
        log.info("source: \n" + html);
        log.info("result: \n" + writer);
       
        List<String> lines = (List<String>) IOUtils.readLines(new StringReader(writer.toString()));
View Full Code Here

TOP

Related Classes of org.apache.portals.applications.webcontent.proxy.impl.DefaultReverseProxyLinkRewritingParserAdaptor

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.